Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 087f5ff

Browse files
authored
Fix bug when item does not have categories (#318)
1 parent fc2afc1 commit 087f5ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

webportal/src/app/market_list/components/item_list.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import Loading from 'App/components/loading';
1313
const { spacing, palette } = getTheme();
1414

1515
const isOfficial = item => {
16-
return item.categories.includes('official example');
16+
return (
17+
!isNil(item.ItemCategories) &&
18+
item.ItemCategories.some(category => category.name === 'official example')
19+
);
1720
};
1821

1922
const Section = styled.div`

0 commit comments

Comments
 (0)