From ea19ee49b37e60c2864f37f0c5449fc6fa008ebd Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 4 Jan 2020 21:10:59 +0100 Subject: [PATCH] Exit from onMove when no target is found. Fixes #2478 --- src/utils/Sorter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index 6a0843fe31..c68abb969c 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -446,9 +446,10 @@ export default Backbone.View.extend({ const sourceModel = this.getSourceModel(); const dims = this.dimsFromTarget(e.target, rX, rY); const target = this.target; - const targetModel = this.getTargetModel(target); + const targetModel = target && this.getTargetModel(target); this.selectTargetModel(targetModel); if (!targetModel) plh.style.display = 'none'; + if (!target) return; this.lastDims = dims; const pos = this.findPosition(dims, rX, rY);