From 6e66f8b227c730e07863a93a8bce5ee0d51d2ddc Mon Sep 17 00:00:00 2001 From: bob Date: Tue, 5 Feb 2019 12:29:57 -0500 Subject: working refactored version. --- src/views/nodes/DocumentView.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/views/nodes/DocumentView.tsx') diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx index 7b81752ad..a1262e2ba 100644 --- a/src/views/nodes/DocumentView.tsx +++ b/src/views/nodes/DocumentView.tsx @@ -130,7 +130,8 @@ export class DocumentView extends React.Component { for (const key of this.layoutKeys) { bindings[key.Name + "Key"] = key; } - bindings.DocumentView = this; + if (bindings.DocumentView === undefined) + bindings.DocumentView = this; for (const key of this.layoutFields) { let field = doc.GetField(key); if (field) { @@ -138,10 +139,7 @@ export class DocumentView extends React.Component { } } return ( -
+