electron: Fix crash on Linux

pull/379/head
Elian Doran 2024-08-31 23:08:19 +07:00
parent 3a3dae3d02
commit c6d043b42c
No known key found for this signature in database
1 changed files with 12 additions and 10 deletions

@ -46,6 +46,7 @@ ipcMain.on('create-extra-window', (event, arg) => {
});
async function createMainWindow(app: App) {
if ("setUserTasks" in app) {
app.setUserTasks([
{
program: process.execPath,
@ -56,6 +57,7 @@ async function createMainWindow(app: App) {
description: 'Open new window'
}
]);
}
const windowStateKeeper = (await import('electron-window-state')).default; // should not be statically imported