Skip to content

Commit

Permalink
Merge pull request #147 from jacobq/guard-against-undefined
Browse files Browse the repository at this point in the history
Guard against missing currentDragEvent
  • Loading branch information
dgavey authored Mar 2, 2019
2 parents 37fb679 + c0bc39d commit bda1a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/services/drag-coordinator.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default Service.extend({

this.set('lastEvent', normalizedEvent);

if (!this.get('isMoving')) {
if (!this.get('isMoving') && this.get('currentDragEvent')) {
if (normalizedEvent.target !== this.get('currentDragEvent').target && hasSameSortingScope) { //if not dragging over self
if (currentOffsetItem !== emberObject) {
if (pos.py > 0.33 && moveDirection === 'up' || pos.py > 0.33 && moveDirection === 'down') {
Expand Down

0 comments on commit bda1a11

Please sign in to comment.