From 8d1b0d969624040140b00bdeda02b1b2efbe9594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8D=9A=E6=96=87?= <1179111926@qq.com> Date: Fri, 19 Aug 2022 14:21:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Simulation/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Simulation/index.tsx b/src/pages/Simulation/index.tsx index 14687ea..a8e2709 100644 --- a/src/pages/Simulation/index.tsx +++ b/src/pages/Simulation/index.tsx @@ -166,7 +166,7 @@ const Page = () => { if (dataSave.current.length > newData.length) { realData = dataSave.current.filter((e: any) => { - if (newData.some((l: any) => l.id === e.id)) { + if (newData.some((l: any) => l?.id === e?.id)) { return true; } return false; @@ -177,7 +177,7 @@ const Page = () => { if (dataSave.current.length < newData.length) { const param = newData.find((e: any) => { - if (!dataSave.current.map((l: any) => l.id).includes(e.id)) { + if (!dataSave.current.map((l: any) => l?.id).includes(e?.id)) { return true; } return false;