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): electron crash on leave fullscreen (#9314)

pengx1770d9cc6b013e
diff --git a/packages/frontend/apps/electron/src/main/windows-manager/main-window.ts b/packages/frontend/apps/electron/src/main/windows-manager/main-window.ts
index 6dcf8a04df..7e775e118f 100644
--- a/packages/frontend/apps/electron/src/main/windows-manager/main-window.ts
+++ b/packages/frontend/apps/electron/src/main/windows-manager/main-window.ts
@@ -153,6 +153,7 @@ export class MainWindowManager {
const refreshBound = (timeout = 0) => {
setTimeout(() => {
+ if (mainWindow.isDestroyed()) return;
// FIXME: workaround for theme bug in full screen mode
const size = mainWindow.getSize();
mainWindow.setSize(size[0] + 1, size[1] + 1);