This commit is contained in:
Vanessa 2023-09-27 09:49:33 +08:00
parent 52773127d2
commit 833e466544

View file

@ -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();
};