Graf15 1 year ago
parent
commit
d98e01d11f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      my-diplom/src/components/adminPage/AdminGoodsTable.jsx

+ 1 - 1
my-diplom/src/components/adminPage/AdminGoodsTable.jsx

@@ -120,7 +120,7 @@ function Row(props) {
         <TableCell align="left">{(row.name)}</TableCell>
         <TableCell align="left">{row.price}</TableCell>
         {/* <TableCell align='center'>{}</TableCell> */}
-        <TableCell align='left'>{Array.isArray(row.categories) ? row.categories[0].name : 0}</TableCell>
+        <TableCell align='left'>{Array.isArray(row.categories) ? row.categories[0]?.name : 0}</TableCell>
       </TableRow>
       <TableRow>
         <TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>