This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
On macOS, main window cannot be activate if closed without --fast-quit option #1415
Closed
4 tasks done
Homework
nativefier --help
and https://github.com/nativefier/nativefier/blob/master/API.mdBug description
On macOS, main window cannot be activate if closed without `--fast-quit`` option. This was due to undefined mainWindow variable.
Steps to reproduce
Then run the app, close the window, try clicking on the dock to restore window.
Expected behavior
Main window is showing properly when click on the dock after closing it earlier
Actual behavior
An error dialog is show up
Debug info
Error popup when click on the dock
Logs during runtime
Traces
nativefier/app/src/main.ts
Line 256 in 59a4bb8
nativefier/app/src/main.ts
Line 323 in 59a4bb8
nativefier/app/src/components/mainWindow.ts
Line 158 in 59a4bb8
From electron/electron#17526, the error seem to be from a redirection by the host.
By wrapping the call with
try/catch
, the issue seem to be gone. I can make a PR but I'm not sure if wrapping it directly would affecting anything else or not, so input is highly appreciated.Context
The text was updated successfully, but these errors were encountered: