Fixed an error in the onDragOver function in drag-and-drop-reorder.js that sometimes the dragged object may be null.
This commit is contained in:
parent
5a6e4f5b5e
commit
652bddc07a
@ -91,7 +91,7 @@ function initializeTouchDragAndDropReordering(list, onReorder) {
|
|||||||
* @param target {Element} the other item that was dragged over
|
* @param target {Element} the other item that was dragged over
|
||||||
*/
|
*/
|
||||||
function onDragOver(dragged, target) {
|
function onDragOver(dragged, target) {
|
||||||
if (target.parentElement !== dragged.parentElement || target === dragged) {
|
if (dragged === null || target.parentElement !== dragged.parentElement || target === dragged) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let isBefore = false;
|
let isBefore = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user