Yansen 2 lat temu
rodzic
commit
77337bd89e

+ 1
- 1
src/pages/Machinery/OperationStatistics/Detail.jsx Wyświetl plik

@@ -16,7 +16,7 @@ export default (props) => {
16 16
 
17 17
   React.useEffect(() => {
18 18
     if (machineryId) {
19
-      getMachineryDetail(machineryId).then(setCurrent);
19
+      getMachineryDetail(machineryId).then((res) => setCurrent(res || {}));
20 20
     }
21 21
   }, [machineryId]);
22 22
 

+ 1
- 1
src/pages/Machinery/OperationStatistics/components/MaJob.jsx Wyświetl plik

@@ -77,7 +77,7 @@ export default (props) => {
77 77
   };
78 78
 
79 79
   React.useEffect(() => {
80
-    if (userId && machine) {
80
+    if (machine) {
81 81
       const { machineryId } = machine;
82 82
       queryData({
83 83
         machineryId,