Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

pengx173772a4700ec0
diff --git a/packages/frontend/apps/electron/src/main/index.ts b/packages/frontend/apps/electron/src/main/index.ts
index 29ea811ab5..545b0137db 100644
--- a/packages/frontend/apps/electron/src/main/index.ts
+++ b/packages/frontend/apps/electron/src/main/index.ts
@@ -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);