aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-02-19 22:27:18 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-02-19 22:27:18 -0500
commit79cc9a4c0ff55641e18e2c92b13263517e5607c1 (patch)
treed0941160044bd74fd09a32c8082effab428870aa /src/client/views/nodes/DocumentView.tsx
parentef10a6bdf753f75cbc5b5d8b7dcc53c3d4c219ad (diff)
fixed loading document views when the document isn't loaded
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 3a4dbb2d5..e9b1d5c8a 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -249,6 +249,8 @@ export class DocumentView extends React.Component<DocumentViewProps> {
return this.props.ScreenToLocalTransform().transform(Transform.Identity.scale(1 / this.props.Scaling));
}
render() {
+ if (!this.props.Document)
+ return <div></div>
let lkeys = this.props.Document.GetT(KeyStore.LayoutKeys, ListField);
if (!lkeys || lkeys === "<Waiting>") {
return <p>Error loading layout keys</p>;