diff --git a/web/client/src/sections/analysis/containers/tableShow.jsx b/web/client/src/sections/analysis/containers/tableShow.jsx index d4ee3e0..dcc1fc1 100644 --- a/web/client/src/sections/analysis/containers/tableShow.jsx +++ b/web/client/src/sections/analysis/containers/tableShow.jsx @@ -103,7 +103,6 @@ const Network = props => { }) } }, [thingId]) - useEffect(async () => { if (sensorId && sensorId.length && sensorsDataItems) { const rs = await dispatch(analysis.findSensorLastData(sensorId)) @@ -150,9 +149,9 @@ const Network = props => { } }, [sensorId]) useEffect(() => { - if (deviceData && deviceData.length && tableData && tableData.length) { + if (deviceData && deviceData.length ) { const dataD = deviceData?.map(p => { - const objRslt = tableData.find(q => q.sensorId == p.sensorId) + const objRslt = tableData?.find(q => q.sensorId == p.sensorId) return { sensorId: objRslt ? objRslt.sensorId : p.sensorId, sensorName: objRslt ? objRslt.sensorName : p.sensorName, @@ -187,7 +186,7 @@ const Network = props => { setLastData(dataD) setLastDataCopy(dataD) } - }, [deviceData, tableData]) + }, [deviceData]) // const lastDataCopy=useMemo(()=>{ // return lastData // },[thingId])