Ignore advertized items which are undefined (#23374)

* Ignore advertized items which are undefined

* Build and update tgui

---------

Co-authored-by: Arthri <41360489+a@users.noreply.github.com>
Co-authored-by: tgui <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Arthri
2023-11-29 12:12:51 -05:00
committed by GitHub
co-authored by Arthri tgui <41898282+github-actions[bot]@users.noreply.github.com>
parent 292c4451f9
commit 74c85eec6d
2 changed files with 9 additions and 6 deletions
+8 -5
View File
@@ -246,11 +246,14 @@ const Advert = (_properties, context) => {
}
>
<Box display="flex" flexWrap="wrap" mb="5px">
{lucky_numbers.map((number, index) => (
<Flex.Item flexShrink={0} key={index} p="0.5%" width="49%">
<UplinkItem grow i={cats[number.cat].items[number.item]} />
</Flex.Item>
))}
{lucky_numbers
.map((number) => cats[number.cat].items[number.item])
.filter((item) => item !== undefined && item !== null)
.map((item, index) => (
<Flex.Item flexShrink={0} key={index} p="0.5%" width="49%">
<UplinkItem grow i={item} />
</Flex.Item>
))}
</Box>
</Section>
);
File diff suppressed because one or more lines are too long