From 307e011a5fbe0433b75cd3d00c0d4d50d578fea0 Mon Sep 17 00:00:00 2001 From: Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> Date: Wed, 12 Feb 2020 03:35:02 -0500 Subject: fixed bugs and intentional behaviors of importer, namely destroying the size stream and making DOF and price optional fields, respectively --- src/client/documents/Documents.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client/documents') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 49d1820f5..b00a1a91d 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -373,10 +373,12 @@ export namespace Docs { const { ImageDocument, StackingDocument } = Docs.Create; if (Array.isArray(__images)) { const constructed = __images.map(relative => Utils.prepend(relative)); + const hero = constructed[0]; + constructed.splice(0, 1); const deviceImages = constructed.map((url, i) => ImageDocument(url, { title: `image${i}.${extname(url)}` })); const doc = StackingDocument(deviceImages, { title: device.title, _LODdisable: true }); const deviceProto = Doc.GetProto(doc); - deviceProto.hero = new ImageField(constructed[0]); + deviceProto.hero = new ImageField(hero); Docs.Get.DocumentHierarchyFromJson(device, undefined, deviceProto); Doc.AddDocToList(parentProto, "data", doc); } -- cgit v1.2.3-70-g09d2