Skip to content

Commit

Permalink
fix: add coalisence operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jun 28, 2024
1 parent c071be6 commit b28bf5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/dashboard/monitoring/docker/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ export const DockerMonitoring = ({
network: data.network[data.network.length - 1] ?? currentData.network,
disk: data.disk[data.disk.length - 1] ?? currentData.disk,
});
setAcummulativeData(data);
setAcummulativeData({
block: data?.block || [],
cpu: data?.cpu || [],
disk: data?.disk || [],
memory: data?.memory || [],
network: data?.network || [],
});
}, [data]);

useEffect(() => {
Expand Down

0 comments on commit b28bf5f

Please sign in to comment.