diff options
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index f5bd4f44c..e2f708700 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1156,9 +1156,7 @@ export namespace Doc { // the document containing the view layout information - will be the Document itself unless the Document has // a layout field or 'layout' is given. export function Layout(doc: Doc, layout?: Doc): Doc { - const templateField = layout && StrCast(layout.isTemplateForField, Doc.LayoutFieldKey(layout)); // the field that the template renders - const overrideLayout = layout && Cast(doc[layout.title + '(' + templateField + ')'], Doc, null); - // [`${StrCast(layout.isTemplateForField, 'data')}_layout[` + layout[Id] + ']'], Doc, null); + const overrideLayout = layout && Cast(doc[layout.title + '(' + StrCast(layout.isTemplateForField, 'data') + ')'], Doc, null); return overrideLayout || doc[DocLayout] || doc; } export function SetLayout(doc: Doc, layout: Doc | string) { |