electron-webapps / meteor-electron

Meteor Electron, the easiest way to create a desktop Meteor application
MIT License
325 stars 46 forks source link

Avoid error if mainWindow is no longer set when "activate" occurs. #90

Open alanning opened 8 years ago

alanning commented 8 years ago

Got this error when testing my electron app on OSX:

Uncaught Exception:
TypeError: Cannot read property 'isVisible' of undefined
    at promptIfAppropriate [as _repeat] (/Users/alanning/src/share911/app/.meteor-electron/darwin-x64/builds/Share911-darwin-x64/Share911.app/Contents/Resources/app.asar/loginSafeguards.js:75:36)
    at wrapper [as _onTimeout] (timers.js:275:19)
    at Timer.listOnTimeout (timers.js:92:15)

Not sure why activate would be called when mainWindow is not set though...