fix: move onSignOut bridge hook call later in the deinit lifecycle

This commit is contained in:
Baptiste Grob
2021-03-24 10:22:55 +01:00
parent b1cf0bd515
commit 7c9b684c83

View File

@@ -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);
}