Skip to content

Commit

Permalink
Added type check for 'dragStarted' variable as this is causing thousa…
Browse files Browse the repository at this point in the history
…nds of console errors in Chrome, Firefox, Edge, IE, Safari before the first drag.

This change is harmless because it is just checking if the variable dragStarted is declared before using it.

Tested across all of the above browsers and working fine after this change.
  • Loading branch information
Ashish Kumar KC committed Nov 19, 2019
1 parent ec7b5e9 commit ac5ec44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/MultiDrag/MultiDrag.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function MultiDragPlugin() {
},

_deselectMultiDrag(evt) {
if (dragStarted) return;
if (typeof dragStarted !== "undefined" && dragStarted) return;

// Only deselect if selection is in this sortable
if (multiDragSortable !== this.sortable) return;
Expand Down

0 comments on commit ac5ec44

Please sign in to comment.