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
commit54074b3faf9b36e86bf2555865c8e42447a9de06 (patch)
treed0941160044bd74fd09a32c8082effab428870aa /src/client/views/nodes/DocumentView.tsx
parent6bd1ed0fc3d070343ecd72de13383f9ad8b1e250 (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>;