Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 619246f

Browse files
committed
Wait until window has initiated before sending url event
1 parent 8584aef commit 619246f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

public/electron.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ app.on('quit', () => {
194194
});
195195

196196
app.setAsDefaultProtocolClient(PREFIX_NAME);
197-
app.on('open-url', (event, url) => {
197+
app.on('open-url', async (event, url) => {
198+
while (!win) {
199+
await new Promise(resolve => setTimeout(resolve, 5000));
200+
}
198201
win && win.webContents.send('open-url', url);
199202
});
200203

0 commit comments

Comments
 (0)