From 042b9c37f0fee3c85d34aa2df7dd64b4f7aadd21 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Mon, 30 Mar 2020 01:39:32 -0400
Subject: tested nested templates and remote doc field embedding in text view

---
 src/client/views/nodes/DocumentContentsView.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/DocumentContentsView.tsx')

diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx
index 5ef330c5a..fbacdcffd 100644
--- a/src/client/views/nodes/DocumentContentsView.tsx
+++ b/src/client/views/nodes/DocumentContentsView.tsx
@@ -78,7 +78,8 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & {
         return proto instanceof Promise ? undefined : proto;
     }
     get layoutDoc() {
-        return Doc.expandTemplateLayout(this.props.LayoutDoc?.() || Doc.Layout(this.props.Document), this.props.Document, "(" + StrCast(this.props.Document.PARAMS) + ")");
+        const params = StrCast(this.props.Document.PARAMS);
+        return Doc.expandTemplateLayout(this.props.LayoutDoc?.() || Doc.Layout(this.props.Document), this.props.Document, params ? "(" + params + ")" : this.props.layoutKey);
     }
 
     CreateBindings(): JsxBindings {
-- 
cgit v1.2.3-70-g09d2

