From c77441b35348c821af7fd6261b6dc72732d5ebad Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 23 Jul 2021 11:47:06 -0500 Subject: [PATCH] Use both instanceof and constructor name as type identification (#438) * Use both instanceof and constructor name as type identification * Linter fix --- angular/src/directives/api-action.directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular/src/directives/api-action.directive.ts b/angular/src/directives/api-action.directive.ts index f6118f7b7f7..d45c9b87f06 100644 --- a/angular/src/directives/api-action.directive.ts +++ b/angular/src/directives/api-action.directive.ts @@ -31,7 +31,7 @@ export class ApiActionDirective implements OnChanges { }, (e: any) => { this.el.nativeElement.loading = false; - if (e instanceof ErrorResponse && (e as ErrorResponse).captchaRequired) { + if ((e instanceof ErrorResponse || e.constructor.name === 'ErrorResponse') && (e as ErrorResponse).captchaRequired) { this.logService.error('Captcha required error response: ' + e.getSingleMessage()); return; }