Sentry fix: handling events from a second instance being launched before app setup crashes

This commit is contained in:
Ben Gotow 2019-06-22 23:28:30 -05:00
parent 8edc9f0fc6
commit 808c7581a4

View file

@ -265,7 +265,7 @@ export default class Application extends EventEmitter {
openWindowsForTokenState() {
// user may trigger this using the application menu / by focusing the app
// before migration has completed and the config has been loaded.
if (!this.config) return;
if (!this.config || !this.windowManager) return;
const accounts = this.config.get('accounts');
const hasAccount = accounts && accounts.length > 0;