wzyyy 3 лет назад
Родитель
Сommit
07a296310b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/pages/device/DashBoard/index.tsx

+ 2 - 2
src/pages/device/DashBoard/index.tsx

@@ -180,8 +180,8 @@ const DeviceBoard = () => {
       },
     ]);
     if (res.status === 200) {
-      const thisMonth = res.result.find((item: any) => item.group === 'thisMonth').data.value;
-      const oneDay = res.result.find((item: any) => item.group === 'oneday').data.value;
+      const thisMonth = res.result.find((item: any) => item.group === 'thisMonth')?.data.value;
+      const oneDay = res.result.find((item: any) => item.group === 'oneday')?.data.value;
       setDay(oneDay);
       setMonth(thisMonth);
       const today = res.result.filter((item: any) => item.group === 'today');