allow quick quit in dev mode (#2692)

This commit is contained in:
Max Novich
2025-05-28 08:16:26 -07:00
committed by GitHub
parent d8821de774
commit d8fa740067

View File

@@ -1290,8 +1290,13 @@ app.on('will-quit', () => {
});
// Quit when all windows are closed, except on macOS or if we have a tray icon.
// Add confirmation dialog when quitting with Cmd+Q
// Add confirmation dialog when quitting with Cmd+Q (skip in dev mode)
app.on('before-quit', (event) => {
// Skip confirmation dialog in development mode
if (MAIN_WINDOW_VITE_DEV_SERVER_URL) {
return; // Allow normal quit behavior in dev mode
}
// Prevent the default quit behavior
event.preventDefault();