From 336702a70a5543dfb2b614ad0239e98e8e37b031 Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Sun, 7 Apr 2024 16:45:32 +0800 Subject: [PATCH] fix bug --- .../pages/Home/components/RoadAndEvents/utils/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index 8049cd56..619bf64a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -127,7 +127,7 @@ export class MarkerCluster { const startIndex = (page - 1) * pageSize; const endIndex = startIndex + pageSize; let num = (page - 1) * pageSize; - if (data.length === 0 || data.length === 1) { + if (!data || data.length === 0 || data.length === 1) { return this.infoWindow.close(); } const { latitude: lat, longitude: lng } = data[0].extData;