diff --git a/packages/client-app/src/flux/stores/identity-store.es6 b/packages/client-app/src/flux/stores/identity-store.es6 index 111b4d639..13f6cff1a 100644 --- a/packages/client-app/src/flux/stores/identity-store.es6 +++ b/packages/client-app/src/flux/stores/identity-store.es6 @@ -22,6 +22,14 @@ class IdentityStore extends NylasStore { } async activate() { + if (NylasEnv.isEmptyWindow()) { + NylasEnv.onWindowPropsReceived(() => { + this.deactivate(); + this.activate(); + }) + return + } + NylasEnv.config.onDidChange('env', this._onEnvChanged); this._onEnvChanged(); @@ -37,7 +45,7 @@ class IdentityStore extends NylasStore { } deactivate() { - this._disp.dispose(); + if (this._disp) this._disp.dispose(); this.stopListeningToAll() }