diff --git a/ui-ngx/src/app/shared/components/toast.directive.ts b/ui-ngx/src/app/shared/components/toast.directive.ts index 3f38401ac4..773a6d298e 100644 --- a/ui-ngx/src/app/shared/components/toast.directive.ts +++ b/ui-ngx/src/app/shared/components/toast.directive.ts @@ -138,7 +138,6 @@ export class ToastDirective implements AfterViewInit, OnDestroy { if (this.toastComponentRef) { this.viewContainerRef.detach(0); this.toastComponentRef.destroy(); - this.toastComponentRef = null; } } }; @@ -166,6 +165,7 @@ export class ToastDirective implements AfterViewInit, OnDestroy { clearTimeout(this.dismissTimeout); this.dismissTimeout = null; } + this.toastComponentRef = null; this.currentMessage = null; }); });