From 87d276c73d0f9d667898d97f3712c257e953d03b Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Thu, 14 Sep 2023 17:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90link?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drawApp/jkApp.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/drawApp/jkApp.ts b/src/drawApp/jkApp.ts index e3a1933..5df8a5a 100644 --- a/src/drawApp/jkApp.ts +++ b/src/drawApp/jkApp.ts @@ -184,14 +184,14 @@ export async function loadLinkDatas(app: IDrawApp) { length: link.length, index: link.index, aRelatedRef: new graphicData.RelatedRef({ - id: link.aRelatedRef.id, - deviceType: link.aRelatedRef.deviceType, - devicePort: link.aRelatedRef.devicePort || 0, + id: link.aRelatedRef?.id, + deviceType: link.aRelatedRef?.deviceType, + devicePort: link.aRelatedRef?.devicePort || 0, }), bRelatedRef: new graphicData.RelatedRef({ - id: link.bRelatedRef.id, - deviceType: link.bRelatedRef.deviceType, - devicePort: link.bRelatedRef.devicePort || 0, + id: link.bRelatedRef?.id, + deviceType: link.bRelatedRef?.deviceType, + devicePort: link.bRelatedRef?.devicePort || 0, }), devicePositions: ((): graphicData.CalculateLink.DevicePosition[] => { const dps: graphicData.CalculateLink.DevicePosition[] = [];