Browse Source

:art: fix https://github.com/siyuan-note/siyuan/issues/9128

Vanessa 1 year ago
parent
commit
c1e4243ab1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/src/boot/onGetConfig.ts

+ 2 - 2
app/src/boot/onGetConfig.ts

@@ -301,7 +301,7 @@ export const initWindow = (app: App) => {
     }
     }
     ipcRenderer.on(Constants.SIYUAN_SAVE_CLOSE, (event, close) => {
     ipcRenderer.on(Constants.SIYUAN_SAVE_CLOSE, (event, close) => {
         if (isWindow()) {
         if (isWindow()) {
-          closeWindow(app);
+            closeWindow(app);
         } else {
         } else {
             winOnClose(currentWindow, close);
             winOnClose(currentWindow, close);
         }
         }
@@ -521,7 +521,7 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
     });
     });
     closeBtnElement.addEventListener("click", () => {
     closeBtnElement.addEventListener("click", () => {
         if (isWindow()) {
         if (isWindow()) {
-            currentWindow.destroy();
+            closeWindow(app);
         } else {
         } else {
             winOnClose(currentWindow);
             winOnClose(currentWindow);
         }
         }