From 7c9b684c834c56f1ab61680792212d1c7b61434a Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Wed, 24 Mar 2021 10:22:55 +0100 Subject: [PATCH] fix: move onSignOut bridge hook call later in the deinit lifecycle --- app/assets/javascripts/ui_models/application.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/ui_models/application.ts b/app/assets/javascripts/ui_models/application.ts index 131c3055b5a..07256a10e09 100644 --- a/app/assets/javascripts/ui_models/application.ts +++ b/app/assets/javascripts/ui_models/application.ts @@ -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); }