mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
This commit is contained in:
parent
52773127d2
commit
833e466544
1 changed files with 5 additions and 1 deletions
|
|
@ -3,7 +3,11 @@ import {getCurrentWindow} from "@electron/remote";
|
|||
|
||||
export const closeWindow = async (app: App) => {
|
||||
for (let i = 0; i < app.plugins.length; i++) {
|
||||
await app.plugins[i].onunload();
|
||||
try {
|
||||
await app.plugins[i].onunload();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
getCurrentWindow().destroy();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue