Parcourir la source

null images check

viktoriia.kapran il y a 1 an
Parent
commit
504ec63e2c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      js21 react/my-react-app/src/pages/admin/GoodsPage.js

+ 1 - 1
js21 react/my-react-app/src/pages/admin/GoodsPage.js

@@ -74,7 +74,7 @@ function GoodsPage() {
                     <TableRow key={good?._id}>
                       <TableCell>
                         <Box sx={{ height: '80px', width: '80px' }}>
-                          <Image url={good?.images[0]?.url} />
+                          <Image url={good?.images && good?.images[0]?.url} />
                         </Box>
                       </TableCell>
                       <TableCell>{good?.name}</TableCell>