Skip to content

Commit

Permalink
fix: poweup catch
Browse files Browse the repository at this point in the history
  • Loading branch information
therockerline committed Feb 21, 2025
1 parent 0fe51c6 commit 765665b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,14 @@ function attachPowerMonitor() {
Log.info('APP POWER RESUME')
let showNethlink = true
if (store.store.account && NethLinkController.instance) {
const isOpen = NethLinkController.instance.window.isOpen()
const isOpen = NethLinkController.instance.window?.isOpen()
showNethlink = isOpen ?? true
try {
await PhoneIslandController.instance.logout()
} catch (e) {
Log.error('POWER RESUME ERROR on logout', e)
}
try {
NethLinkController.instance.logout()
} catch (e) {
Log.error('POWER RESUME ERROR on logout', e)
Expand Down

0 comments on commit 765665b

Please sign in to comment.