Skip to content

Commit

Permalink
Exit from onMove when no target is found. Fixes #2478
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jan 4, 2020
1 parent 851847c commit ea19ee4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/Sorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ea19ee4

Please sign in to comment.