Explorar o código

null images check

viktoriia.kapran hai 1 ano
pai
achega
bc5fb5c892
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      js21 react/my-react-app/src/pages/admin/CategoriesPage.js

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

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