Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Prevent accidentally overriding preventDefault with undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Nov 5, 2013
1 parent 876fa42 commit c5de81d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@
inEvent.relatedTarget = null;
}
var e = new PointerEvent(inType, inEvent);
e.preventDefault = inEvent.preventDefault;
if (inEvent.preventDefault) {
e.preventDefault = inEvent.preventDefault;
}
this.targets.set(e, this.targets.get(inEvent) || inEvent.target);
return e;
},
Expand Down

0 comments on commit c5de81d

Please sign in to comment.