mirror of
https://github.com/LukeHagar/sveltekit-adapters.git
synced 2025-12-09 12:47:48 +00:00
Update examples/electron/src/main.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -52,6 +52,11 @@ app.on('window-all-closed', () => {
|
|||||||
|
|
||||||
app.on('activate', async () => {
|
app.on('activate', async () => {
|
||||||
if (BrowserWindow.getAllWindows().length === 0 && !mainWindow) {
|
if (BrowserWindow.getAllWindows().length === 0 && !mainWindow) {
|
||||||
|
try {
|
||||||
await createWindow();
|
await createWindow();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to create window:', error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user