aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ComparisonBox.tsx
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-06-23 13:50:41 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-06-23 13:50:41 +0800
commitc4a448445471b64dd13990245f16bc10625b28c0 (patch)
tree5c0ee18402b1ea35f0eab9de11b5abf7fc8dc434 /src/client/views/nodes/ComparisonBox.tsx
parent790d41009a678f560cd3b78e86069251e494cfd1 (diff)
parent10382b7fcac2d92dc845e9b271e38de3d8c09feb (diff)
Merge branch 'master' into mobile_revision_direct
Diffstat (limited to 'src/client/views/nodes/ComparisonBox.tsx')
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index 14a2c25bf..f140cc6e5 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -39,10 +39,12 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C
@undoBatch
private dropHandler = (event: Event, dropEvent: DragManager.DropEvent, fieldKey: string) => {
- event.stopPropagation(); // prevent parent Doc from registering new position so that it snaps back into place
- const droppedDocs = dropEvent.complete.docDragData?.droppedDocuments;
- if (droppedDocs?.length) {
- this.dataDoc[fieldKey] = droppedDocs[0];
+ if (dropEvent.complete.docDragData) {
+ event.stopPropagation(); // prevent parent Doc from registering new position so that it snaps back into place
+ const droppedDocs = dropEvent.complete.docDragData?.droppedDocuments;
+ if (droppedDocs?.length) {
+ this.dataDoc[fieldKey] = droppedDocs[0];
+ }
}
}