From 713e0176c7cf687d7224bd1db9b9ec3db5740531 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Mon, 31 Oct 2022 08:04:03 +0000 Subject: [PATCH] fix: marketplace undefined errors --- src/components/modals/main/marketplace/Items.jsx | 3 +-- .../modals/main/marketplace/sections/Marketplace.jsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/modals/main/marketplace/Items.jsx b/src/components/modals/main/marketplace/Items.jsx index e7671aa7..1e0afe72 100644 --- a/src/components/modals/main/marketplace/Items.jsx +++ b/src/components/modals/main/marketplace/Items.jsx @@ -77,8 +77,7 @@ function Items({ ) : null}
- {items - .filter( + {items?.filter( (item) => item.name.toLowerCase().includes(filter.toLowerCase()) || filter === '' || diff --git a/src/components/modals/main/marketplace/sections/Marketplace.jsx b/src/components/modals/main/marketplace/sections/Marketplace.jsx index 5ac8df33..e7c8ce57 100644 --- a/src/components/modals/main/marketplace/sections/Marketplace.jsx +++ b/src/components/modals/main/marketplace/sections/Marketplace.jsx @@ -295,7 +295,7 @@ export default class Marketplace extends PureComponent { ); }; - if (this.state.items.length === 0) { + if (this.state.items?.length === 0) { return ( <> {featured()}