From 0ffa616f100fb340944ccb38e8b6f85020e10c51 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Fri, 26 Dec 2014 09:20:11 +0300 Subject: [PATCH] #199: + check 'dataTransfer' exists --- Sortable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sortable.js b/Sortable.js index 5d10475..44a02e5 100644 --- a/Sortable.js +++ b/Sortable.js @@ -372,8 +372,10 @@ this._loopId = setInterval(this._emulateDragOver, 150); } else { - dataTransfer.effectAllowed = 'move'; - options.setData && options.setData.call(this, dataTransfer, dragEl); + if (dataTransfer) { + dataTransfer.effectAllowed = 'move'; + options.setData && options.setData.call(this, dataTransfer, dragEl); + } _on(document, 'drop', this); }