From a71217220a946eef25a87973663f404e3f895c28 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 9 Dec 2020 10:38:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4mapDevice=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/utils/parser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index 2733cdba6..34742137b 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -216,8 +216,8 @@ export function parser(data, skinCode, showConfig) { zrUtil.each(data.indicatorLightList || [], elem => { mapDevice[elem.code] = createDevice(elem.type, elem, propConvert, showConfig); - if (elem.type == 'SwitchFault') { - mapDevice[elem.switchCode].switchFaultCode = elem.code; // 道岔数据上关联道岔故障表示灯(需保证该数据在switchList之后处理) + if (elem.type == 'SwitchFault' && mapDevice[elem.switchCode]) { + mapDevice[elem.switchCode]['switchFaultCode'] = elem.code; // 道岔数据上关联道岔故障表示灯(需保证该数据在switchList之后处理) } }, this);