Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Fixes #9763: Suppress error that happens during desktop shutdown #9878

Merged
merged 2 commits into from Feb 8, 2024

Conversation

pedr
Copy link
Collaborator

@pedr pedr commented Feb 7, 2024

Fixes #9763

Description

The error reported in the issue describes a behavior that seems to happen during the shutdown process from the Desktop app. To prevent the error from happening we are checking if the window object still available, if not we just log a warn message

"The window object was not available during the click event from tray icon"

Testing

To test the behavior I enable the tray icon in the settings and update the code in ElectronAppWrapper to set the this.win_ to null just after the this.win_.hide() method is called.

After this, if I clicked the tray icon the message should be logged in the terminal.

@pedr pedr requested a review from laurent22 February 7, 2024 23:56
@laurent22 laurent22 merged commit c163491 into laurent22:dev Feb 8, 2024
10 checks passed
@pedr pedr deleted the surpress-error-from-window-show branch February 9, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix "TypeError: Cannot read properties of null (reading 'show')"
2 participants