Fixed leftover commas in json (#2183)

This commit is contained in:
Joe Milazzo 2023-08-05 15:31:03 -05:00 committed by GitHub
parent 1902566e78
commit 518b8400e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 15 deletions

View file

@ -10,7 +10,7 @@ import { Router } from '@angular/router';
import { ToastrService } from 'ngx-toastr';
import { catchError } from 'rxjs/operators';
import { AccountService } from '../_services/account.service';
import {TranslocoService} from "@ngneat/transloco";
import {translate, TranslocoService} from "@ngneat/transloco";
@Injectable()
export class ErrorInterceptor implements HttpInterceptor {
@ -41,8 +41,9 @@ export class ErrorInterceptor implements HttpInterceptor {
break;
default:
// Don't throw multiple Something unexpected went wrong
if (this.toastr.previousToastMessage !== 'Something unexpected went wrong.' && this.toastr.previousToastMessage !== 'errors.generic') {
this.toast('errors.generic');
const genericError = this.translocoService.translate('errors.generic');
if (this.toastr.previousToastMessage !== 'Something unexpected went wrong.' && this.toastr.previousToastMessage !== genericError) {
this.toast(genericError);
}
break;
}