From f8e59054688a49d1383243b53280eb89d9f4c3a3 Mon Sep 17 00:00:00 2001 From: "13621160019@163.com" <13621160019@163.com> Date: Sun, 22 Aug 2021 14:37:20 +0800 Subject: [PATCH] fixed issue of 'typeof' expression is compared to 'null' --- web/src/components/MyEMS/AuxiliarySystem/EnergyFlowDiagram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/MyEMS/AuxiliarySystem/EnergyFlowDiagram.js b/web/src/components/MyEMS/AuxiliarySystem/EnergyFlowDiagram.js index 5f509a5f..4754ff6b 100644 --- a/web/src/components/MyEMS/AuxiliarySystem/EnergyFlowDiagram.js +++ b/web/src/components/MyEMS/AuxiliarySystem/EnergyFlowDiagram.js @@ -123,7 +123,7 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => { } energyFlowDiagramData.links.forEach(function (item) { - if(typeof item.value === 'null') { + if(item.value === null) { item.value = 0; } let sourceColor = null;