Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit 7a09bc3

Browse files
author
Daniel Brain
committed
Error out when the window is closed
1 parent 850e35c commit 7a09bc3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/drivers/send/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export let sendMessage = promise.method((win, message, domain, isProxy) => {
3434
throw new Error('Attemping to send message to self');
3535
}
3636

37+
if (win.closed) {
38+
throw new Error('Window is closed');
39+
}
40+
3741
util.debug('Running send message strategies', message);
3842

3943
return util.windowReady.then(() => {

0 commit comments

Comments
 (0)