diff options
Diffstat (limited to 'src/client/documents')
-rw-r--r-- | src/client/documents/Documents.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 9c064ece5..c3f03aede 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -664,6 +664,8 @@ export namespace Docs { if (field instanceof ImageField) { created = Docs.Create.ImageDocument((field as ImageField).url.href, resolved); layout = ImageBox.LayoutString; + } else if (field instanceof Doc) { + created = field; } else if (field instanceof VideoField) { created = Docs.Create.VideoDocument((field as VideoField).url.href, resolved); layout = VideoBox.LayoutString; @@ -690,7 +692,7 @@ export namespace Docs { created = Docs.Create.TextDocument({ ...{ width: 200, height: 25, autoHeight: true }, ...resolved }); layout = FormattedTextBox.LayoutString; } - created.layout = layout(fieldKey); + created.layout = layout?.(fieldKey); proto && (created.proto = Doc.GetProto(proto)); return created; } |