From 4ef4d06413169971a3919aa0c935eb321be7288b Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 14 Feb 2021 21:48:55 -0500 Subject: fixed freeformview focus to not pan annotation documents or layoutEngine freeform views. fixed some exceptions. cleaned up focus() return value. --- src/client/views/collections/CollectionDockingView.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/views/collections/CollectionDockingView.tsx') 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(docs); + const tabdocs = await DocListCastAsync(tabs?.data); + const otherdocs = await DocListCastAsync(other?.data); + tabs && (Doc.GetProto(tabs).data = new List(docs)); const otherSet = new Set(); 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(Array.from(otherSet.values())); + other && (Doc.GetProto(other).data = new List(Array.from(otherSet.values()))); }, 0); } -- cgit v1.2.3-70-g09d2