From 313f7166137e795e37a6f045a2a32ac93398a800 Mon Sep 17 00:00:00 2001 From: fan Date: Mon, 30 Oct 2023 16:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B2=94=E8=8A=AF=E8=BE=B9=E7=BC=98=E9=81=93?= =?UTF-8?q?=E5=B2=94=E5=8C=BA=E6=AE=B5=E5=85=B3=E8=81=94=E9=81=93=E5=B2=94?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Section/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index b7e4a3583..2bf166ed1 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -483,6 +483,9 @@ export default class Section extends Group { // 哈尔滨线路 南京二 道岔相关区段设置 默认颜色 if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) { const switchModel = this.mapDevice[model.relSwitchCode]; + if (!switchModel) { + return; + } const sectionB = switchModel.sectionBCode === model.code ? this.mapDevice[switchModel.sectionBCode] : null; const sectionC = switchModel.sectionCCode === model.code ? this.mapDevice[switchModel.sectionCCode] : null; const sectionA = this.mapDevice[switchModel.sectionACode];