From a50e67b818023704a425483f84416113c6ba2650 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 7 Jul 2023 09:23:11 +0800 Subject: [PATCH] fix undefind roads --- web/client/src/sections/fillion/components/file/roadModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/fillion/components/file/roadModal.js b/web/client/src/sections/fillion/components/file/roadModal.js index 994b5224..e4a87e8b 100644 --- a/web/client/src/sections/fillion/components/file/roadModal.js +++ b/web/client/src/sections/fillion/components/file/roadModal.js @@ -13,7 +13,7 @@ const RoadModal = props => { clearTimeout(timer) else { timer = setTimeout(() => { - if (roads.some(item => item.roadName == roadName)) { + if (roads && roads.some(item => item.roadName == roadName)) { setIsRepeated(true) } else { setIsRepeated(false);