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

Commit 3223d8c

Browse files
committed
Events: Fix issue where we ignored null relatedTargets
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.
1 parent d7629dd commit 3223d8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/wrappers/events.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,11 @@
466466

467467
var relatedTargetProto = {
468468
get relatedTarget() {
469-
return relatedTargetTable.get(this) || wrap(unwrap(this).relatedTarget);
469+
var relatedTarget = relatedTargetTable.get(this);
470+
// relatedTarget can be null.
471+
if (relatedTarget !== undefined)
472+
return relatedTarget;
473+
return wrap(unwrap(this).relatedTarget);
470474
}
471475
};
472476

0 commit comments

Comments
 (0)