mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-07 07:34:17 +00:00
if we get garbage from frontend for nonessential feature, do not blow up
This commit is contained in:
parent
2dde086b80
commit
0c3931bf4e
@ -40,6 +40,12 @@ export default function ActiveUsers() {
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []); // it is critical to only run this once.
|
}, []); // it is critical to only run this once.
|
||||||
|
|
||||||
|
// activeUsers is supposed to be an array, but it is based on the response body
|
||||||
|
// from a network call, so who knows what might happen. Be safe.
|
||||||
|
if (!activeUsers.map) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const au = activeUsers.map((activeUser: User) => {
|
const au = activeUsers.map((activeUser: User) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user