From b83a38a3a92c0149562da460ad9c35eaaf3054ec Mon Sep 17 00:00:00 2001
From: geireann <60007097+geireann@users.noreply.github.com>
Date: Sun, 26 Jul 2020 17:41:01 +0800
Subject: download name update

**not part of pres trails**
---
 src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index ba9385514..480abdaed 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -114,10 +114,10 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
     }
 
     public static setupZoom(doc: Doc, zoomProgressivize: boolean = false) {
-        let width = new List<number>();
-        let height = new List<number>();
-        let top = new List<number>();
-        let left = new List<number>();
+        const width = new List<number>();
+        const height = new List<number>();
+        const top = new List<number>();
+        const left = new List<number>();
         width.push(NumCast(doc.width));
         height.push(NumCast(doc.height));
         top.push(NumCast(doc.height) / -2);
@@ -176,7 +176,7 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
             NativeWidth={this.NativeWidth}
             PanelWidth={this.panelWidth}
             PanelHeight={this.panelHeight} />;
-        if (this.layoutDoc === PresBox.Instance.childDocs[PresBox.Instance.itemIndex]?.presentationTargetDoc) {
+        if (PresBox.Instance && this.layoutDoc === PresBox.Instance.childDocs[PresBox.Instance.itemIndex]?.presentationTargetDoc) {
             const effectProps = {
                 left: this.layoutDoc.presEffectDirection === 'left',
                 right: this.layoutDoc.presEffectDirection === 'right',
-- 
cgit v1.2.3-70-g09d2

