From f88515745c1164576929f63f72b1f06bdf79464a Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 17 Mar 2022 22:24:22 -0400 Subject: [PATCH] Remove error Response type check (#731) * Remove error Response type check Minimization is impacting type checking in a non-consistent way. The previous type check works locally, but not from build artifacts :shrug:. We only set `captchaRequired` on our errors when we want a resubmit with captcha included, so we're safe keying off that * linter --- angular/src/directives/api-action.directive.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/angular/src/directives/api-action.directive.ts b/angular/src/directives/api-action.directive.ts index ed119a3699..357cefb4ed 100644 --- a/angular/src/directives/api-action.directive.ts +++ b/angular/src/directives/api-action.directive.ts @@ -31,10 +31,7 @@ export class ApiActionDirective implements OnChanges { (e: any) => { this.el.nativeElement.loading = false; - if ( - (e instanceof ErrorResponse || e.constructor.name === ErrorResponse.name) && - (e as ErrorResponse).captchaRequired - ) { + if ((e as ErrorResponse).captchaRequired) { this.logService.error("Captcha required error response: " + e.getSingleMessage()); return; }