Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e60b95

Browse files
author
Jesper Hermann Munk
committed
Fixed unhandled exception happening in _mouseMove handler on line 209, 'this.el' is undefined. Happens if element is removed just before call of _mouseMove and just after _mouseDown.
1 parent 599965a commit 9e60b95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dd-draggable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
120120
public destroy(): void {
121121
if (this.dragTimeout) window.clearTimeout(this.dragTimeout);
122122
delete this.dragTimeout;
123-
if (this.dragging) this._mouseUp(this.mouseDownEvent);
123+
if (this.mouseDownEvent) this._mouseUp(this.mouseDownEvent);
124124
this.disable(true);
125125
delete this.el;
126126
delete this.helper;

0 commit comments

Comments
 (0)