aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-30 16:46:43 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-30 16:46:43 -0500
commitab6db12f09df114fc4ecdd886cccac7ebc6bb6f9 (patch)
tree81743e479b95b4dc62c8e0db20eed020e874aebd /src/client/documents/Documents.ts
parent3cc69c7f5ae7f7a747ab72b522ea81af38dd7f20 (diff)
parenta38e20347c1720c241513279c9510b8e116ba683 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_linking
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 9feee0d47..3d4694bc5 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -414,7 +414,7 @@ export namespace Docs {
// synthesize the default options, the type and title from computed values and
// whatever options pertain to this specific prototype
const options = { title, type, baseProto: true, ...defaultOptions, ...(template.options || {}) };
- options.layout = layout.view.LayoutString(layout.dataField);
+ options.layout = layout.view?.LayoutString(layout.dataField);
const doc = Doc.assign(new Doc(prototypeId, true), { layoutKey: "layout", ...options });
doc.layout_keyValue = KeyValueBox.LayoutString("");
return doc;