Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Events: Fix issue where we ignored null relatedTargets
Browse files Browse the repository at this point in the history
We set the relatedTarget to null in a few cases to work around bugs
in IE, but we ignored null due to the falsey check in the getter.
  • Loading branch information
arv committed Mar 28, 2014
1 parent d7629dd commit 3223d8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wrappers/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,11 @@

var relatedTargetProto = {
get relatedTarget() {
return relatedTargetTable.get(this) || wrap(unwrap(this).relatedTarget);
var relatedTarget = relatedTargetTable.get(this);
// relatedTarget can be null.
if (relatedTarget !== undefined)
return relatedTarget;
return wrap(unwrap(this).relatedTarget);
}
};

Expand Down

0 comments on commit 3223d8c

Please sign in to comment.