修改生成link报错问题

This commit is contained in:
dong 2023-09-14 17:14:59 +08:00
parent d6e8d8a7e8
commit 87d276c73d

View File

@ -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[] = [];