Skip to content

Commit

Permalink
fix: move onSignOut bridge hook call later in the deinit lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Mar 24, 2021
1 parent b1cf0bd commit 7c9b684
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/ui_models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ export class WebApplication extends SNApplication {
this.scope = undefined;
(this.openModalComponent as any) = undefined;
(this.presentPermissionsDialog as any) = undefined;
if (source === DeinitSource.SignOut) {
this.bridge.onSignOut();
}
/** Allow our Angular directives to be destroyed and any pending digest cycles
* to complete before destroying the global application instance and all its services */
setTimeout(() => {
super.deinit(source);
if (source === DeinitSource.SignOut) {
this.bridge.onSignOut();
}
}, 0);
}

Expand Down

0 comments on commit 7c9b684

Please sign in to comment.