fix(electron): browserwindow creationis sometimes too early (#11787)

fix https://toeverything.sentry.io/issues/6548826257/events/31d3c96a20c24c908188b3004b3ecab7?project=4506307500179456
This commit is contained in:
pengx17
2025-04-18 05:42:48 +00:00
parent 1c6eea21df
commit 3772a4700e

View File

@@ -73,7 +73,9 @@ app.on('window-all-closed', () => {
* @see https://www.electronjs.org/docs/latest/api/app#event-activate-macos Event: 'activate'
*/
app.on('activate', () => {
launch().catch(e => console.error('Failed launch:', e));
if (app.isReady()) {
launch().catch(e => console.error('Failed launch:', e));
}
});
setupDeepLink(app);