From 658040d9e02cc9f5b2fd648f7a07721f9e1de322 Mon Sep 17 00:00:00 2001 From: dmitrykurmanov Date: Mon, 5 Aug 2024 16:57:08 +0400 Subject: [PATCH] work for the https://github.com/surveyjs/survey-creator/issues/5740 --- src/dragdrop/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dragdrop/core.ts b/src/dragdrop/core.ts index 30ac0b54b6..61d3e77b7e 100644 --- a/src/dragdrop/core.ts +++ b/src/dragdrop/core.ts @@ -63,7 +63,7 @@ export abstract class DragDropCore implements IDragDropEngine { event ); this.onStartDrag(event); - const fromElement = this.draggedElement.parent; + const fromElement = this.draggedElement && this.draggedElement.parent; this.onDragStart.fire(this, { fromElement: fromElement, draggedElement: this.draggedElement }); }