Projekt

Obecné

Profil

« Předchozí | Další » 

Revize c1161e82

Přidáno uživatelem Fantič před více než 1 rok

re #10819 ItemView prevent error states

Zobrazit rozdíly:

src/components/item/ItemView.tsx
47 47
                                </VStack>
48 48
                                <Box marginLeft="auto" marginTop={0}> {/* marginLeft: "auto" pushes the Box to the right */}
49 49
                                    <Button variant="outline" size="md">
50
                                        {item.concordances[0].id}
50
                                        {item?.concordances?.[0]?.id}
51 51
                                    </Button>
52 52
                                </Box>
53 53
                            </HStack>
......
59 59
                                            {item.inventoryItem}
60 60
                                        </Text>
61 61
                                        <Text italic marginTop="2.5%">
62
                                            {item.searchSubjects.map((subject, index) => (
63
                                                index < item.searchSubjects.length - 1 ? (subject + ", ") : (subject)
62
                                            {item.searchSubjects != undefined && item?.searchSubjects?.map((subject, index) => (
63
                                                item.searchSubjects && index < item.searchSubjects.length - 1 ? (subject + ", ") : (subject)
64 64
                                            ))}
65 65
                                        </Text>
66 66
                                    </VStack>}

Také k dispozici: Unified diff