aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authorSam Wilkins <35748010+samwilkins333@users.noreply.github.com>2020-02-12 03:35:02 -0500
committerSam Wilkins <35748010+samwilkins333@users.noreply.github.com>2020-02-12 03:35:02 -0500
commit307e011a5fbe0433b75cd3d00c0d4d50d578fea0 (patch)
tree028c1c833e6321041694215bf0d3d6817c4b0c7f /src/client/documents
parent11a909858e4e6fe66d5c19041bf7a8c5c1e4a547 (diff)
fixed bugs and intentional behaviors of importer, namely destroying the size stream and making DOF and price optional fields, respectively
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/Documents.ts4
1 files changed, 3 insertions, 1 deletions
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);
}