diff options
author | bobzel <zzzman@gmail.com> | 2025-03-21 19:24:06 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-21 19:24:06 -0400 |
commit | bc308b888f41e8789f1b9f522ced46e68e726862 (patch) | |
tree | 6e1747536982c0dbc953b1ac7f47e8e1d0f56e58 /src/fields/Doc.ts | |
parent | 7e4d793eaa7e5b6b564355a11fa02a5611645f20 (diff) |
from last
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) { |