diff --git a/src/graphics/CommonGraphics.ts b/src/graphics/CommonGraphics.ts index 72d9bfe..3055108 100644 --- a/src/graphics/CommonGraphics.ts +++ b/src/graphics/CommonGraphics.ts @@ -85,7 +85,7 @@ export function createRelatedRefProto( [TrainWindow.Type, graphicData.RelatedRef.DeviceType.TrainWindow], ]); const protoDeviceType = typeMap.get(type); - if (!protoDeviceType) throw Error(`输入的type有误: ${type}`); + if (protoDeviceType !== undefined) throw Error(`输入的type有误: ${type}`); const protoData = new graphicData.RelatedRef({ deviceType: protoDeviceType, id,