diff --git a/components/user-list.js b/components/user-list.js index effca4db..c0c7a1d4 100644 --- a/components/user-list.js +++ b/components/user-list.js @@ -44,7 +44,7 @@ export default function UserList ({ ssrData, query, variables, destructureData } useEffect(() => { // shift the stat we are sorting by to the front const comps = [...STAT_COMPONENTS] - setStatComps(seperate([...comps.splice(STAT_POS[variables.by || 0], 1), ...comps], Seperator)) + setStatComps(seperate([...comps.splice(STAT_POS[variables?.by || 0], 1), ...comps], Seperator)) }, [variables?.by]) const { users, cursor } = useMemo(() => {