aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocHolderBox.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-14 15:31:55 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-14 15:31:55 -0500
commitd4bc59df1de20fd95dd91d0ebd064ba0cf046c46 (patch)
treee7956f5314957bebc9b55812c40fbc7b87040c23 /src/client/views/nodes/DocHolderBox.tsx
parent0270f73f924c1a097354421472b5d689ebf04e98 (diff)
parent5b9d33920858a42319e84eab2c515919feba45ac (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_schema_view
Diffstat (limited to 'src/client/views/nodes/DocHolderBox.tsx')
-rw-r--r--src/client/views/nodes/DocHolderBox.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/nodes/DocHolderBox.tsx b/src/client/views/nodes/DocHolderBox.tsx
index 0c5239d66..a4c4663dd 100644
--- a/src/client/views/nodes/DocHolderBox.tsx
+++ b/src/client/views/nodes/DocHolderBox.tsx
@@ -198,11 +198,10 @@ export class DocHolderBox extends ViewBoxAnnotatableComponent<FieldViewProps, Do
@undoBatch
@action
drop = (e: Event, de: DragManager.DropEvent) => {
- if (de.complete.docDragData) {
- if (de.complete.docDragData.draggedDocuments[0].type === DocumentType.FONTICON) {
- const doc = Cast(de.complete.docDragData.draggedDocuments[0].dragFactory, Doc, null);
- this.layoutDoc.childLayoutTemplate = doc;
- }
+ const docDragData = de.complete.docDragData;
+ if (docDragData?.draggedDocuments[0].type === DocumentType.FONTICON) {
+ const doc = Cast(docDragData.draggedDocuments[0].dragFactory, Doc, null);
+ this.layoutDoc.childLayoutTemplate = doc;
}
}
protected createDropTarget = (ele: HTMLDivElement) => {