fix crash opening user items page logged out
This commit is contained in:
parent
49d3b3685d
commit
bb46c1f184
1 changed files with 4 additions and 2 deletions
|
@ -70,9 +70,11 @@ function UserItemsPage() {
|
||||||
return <Box color="red.400">{error.message}</Box>;
|
return <Box color="red.400">{error.message}</Box>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const itemIdsYouOwn = new Set(data.currentUser.itemsTheyOwn.map((i) => i.id));
|
const itemIdsYouOwn = new Set(
|
||||||
|
data.currentUser?.itemsTheyOwn.map((i) => i.id) || []
|
||||||
|
);
|
||||||
const itemIdsYouWant = new Set(
|
const itemIdsYouWant = new Set(
|
||||||
data.currentUser.itemsTheyWant.map((i) => i.id)
|
data.currentUser?.itemsTheyWant.map((i) => i.id) || []
|
||||||
);
|
);
|
||||||
|
|
||||||
// This helps you compare your owns/wants to other users! If they own
|
// This helps you compare your owns/wants to other users! If they own
|
||||||
|
|
Loading…
Reference in a new issue