don't prevent app quit

This commit is contained in:
Labhansh Agrawal 2022-01-03 18:38:38 +05:30
parent 8f2acf43e6
commit 0725a5fc0a

View file

@ -57,17 +57,11 @@ const _watch = () => {
console.error('error watching config', error); console.error('error watching config', error);
}); });
app.on('before-quit', (e) => { app.on('before-quit', () => {
if (Object.keys(_watcher.getWatched()).length > 0) { if (Object.keys(_watcher.getWatched()).length > 0) {
e.preventDefault(); _watcher.close().catch((err) => {
_watcher console.warn(err);
.close() });
.catch((err) => {
console.warn(err);
})
.finally(() => {
app.quit();
});
} }
}); });
}; };