From ca298960aec78371e4e0d18fa1dde5ff5046279d Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Thu, 25 Mar 2021 15:23:06 +0100 Subject: [PATCH] Do not show old errors on the spinner --- .../components/global-spinner/global-spinner.component.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/src/app/shared/components/global-spinner/global-spinner.component.ts b/client/src/app/shared/components/global-spinner/global-spinner.component.ts index d1e87618f..a3c528574 100644 --- a/client/src/app/shared/components/global-spinner/global-spinner.component.ts +++ b/client/src/app/shared/components/global-spinner/global-spinner.component.ts @@ -31,11 +31,6 @@ export class GlobalSpinnerComponent implements OnInit, OnDestroy { */ private spinnerSubscription: Subscription; - /** - * Constant string as default message when the spinner is shown. - */ - private LOADING = this.translate.instant('Loading data. Please wait ...'); - public error: ErrorInformation | null = null; /** @@ -64,10 +59,11 @@ export class GlobalSpinnerComponent implements OnInit, OnDestroy { this.spinnerSubscription = this.overlayService // subscribe to the service. .getSpinner() .subscribe((value: { isVisible: boolean; text: string }) => { + this.error = null; this.isVisible = value.isVisible; this.text = this.translate.instant(value.text); if (!this.text) { - this.text = this.LOADING; + this.text = this.translate.instant('Loading data. Please wait ...'); } this.cd.detectChanges(); });