Skip to content

Commit

Permalink
check if relatedTarget is undefined for fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
claytercek committed Aug 13, 2020
1 parent 0d1fb7b commit ccdf9c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/SyntheticEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const MouseEventInterface = {
button: 0,
buttons: 0,
relatedTarget: function(event) {
if (!event.relatedTarget && event.fromElement)
if (event.relatedTarget === undefined)
return event.fromElement === event.srcElement
? event.toElement
: event.fromElement;
Expand Down

0 comments on commit ccdf9c2

Please sign in to comment.