aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorSam Wilkins <35748010+samwilkins333@users.noreply.github.com>2020-02-10 16:46:04 -0500
committerSam Wilkins <35748010+samwilkins333@users.noreply.github.com>2020-02-10 16:46:04 -0500
commit8442f8720c2ad090358ef664f6b0806b23a6e145 (patch)
tree394d46596ee75b95c1afe66d11dbf93dd61f7a4e /src/client/documents/Documents.ts
parent12bbb2650a1afb4afb9c1774b756e9c3826367b7 (diff)
build urls
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index f9dab9738..93500b920 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -373,10 +373,11 @@ export namespace Docs {
delete device.__images;
const { ImageDocument, StackingDocument } = Docs.Create;
if (Array.isArray(__images)) {
- const deviceImages = __images.map((url, i) => ImageDocument(Utils.prepend(url), { title: `image${i}.${extname(url)}` }));
+ const constructed = __images.map(relative => Utils.prepend(relative));
+ const deviceImages = constructed.map((url, i) => ImageDocument(url, { title: `image${i}.${extname(url)}` }));
const doc = StackingDocument(deviceImages, { title: device.title, _LODdisable: true });
const protoDoc = Doc.GetProto(doc);
- protoDoc.hero = new ImageField(__images[0]);
+ protoDoc.hero = new ImageField(constructed[0]);
Docs.Get.DocumentHierarchyFromJson(device, undefined, protoDoc);
Doc.AddDocToList(parentProto, "data", doc);
}