Skip to content

Commit

Permalink
Additional safety check for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brain committed Nov 29, 2020
1 parent 7dd8648 commit 8328ff2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/drivers/receive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export function receiveMessage(event : MessageEvent, { on, send } : {| on : OnTy
let { source, origin, data } = event;

if (__TEST__) {
if (isWindowClosed(source)) {
return;
}

// $FlowFixMe
origin = getDomain(source);
}
Expand Down

0 comments on commit 8328ff2

Please sign in to comment.