aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionDockingView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-14 21:48:55 -0500
committerbobzel <zzzman@gmail.com>2021-02-14 21:48:55 -0500
commit4ef4d06413169971a3919aa0c935eb321be7288b (patch)
treec2cd7ba6ad4321b30ef9865134d91b4131fdffe9 /src/client/views/collections/CollectionDockingView.tsx
parent6fcef3d8dfdbe373724d2f11c9df8f350bd8950c (diff)
fixed freeformview focus to not pan annotation documents or layoutEngine freeform views. fixed some exceptions. cleaned up focus() return value.
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index eee939c07..47c5746d4 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -375,13 +375,13 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) {
const sublists = DocListCast(this.props.Document[this.props.fieldKey]);
const tabs = Cast(sublists[0], Doc, null);
const other = Cast(sublists[1], Doc, null);
- const tabdocs = await DocListCastAsync(tabs.data);
- const otherdocs = await DocListCastAsync(other.data);
- Doc.GetProto(tabs).data = new List<Doc>(docs);
+ const tabdocs = await DocListCastAsync(tabs?.data);
+ const otherdocs = await DocListCastAsync(other?.data);
+ tabs && (Doc.GetProto(tabs).data = new List<Doc>(docs));
const otherSet = new Set<Doc>();
otherdocs?.filter(doc => !docs.includes(doc)).forEach(doc => otherSet.add(doc));
tabdocs?.filter(doc => !docs.includes(doc)).forEach(doc => otherSet.add(doc));
- Doc.GetProto(other).data = new List<Doc>(Array.from(otherSet.values()));
+ other && (Doc.GetProto(other).data = new List<Doc>(Array.from(otherSet.values())));
}, 0);
}