1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

Use both instanceof and constructor name as type identification (#438)

* Use both instanceof and constructor name as type identification

* Linter fix
This commit is contained in:
Matt Gibson
2021-07-23 11:47:06 -05:00
committed by GitHub
parent e9d9cd0182
commit c77441b353

View File

@@ -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;
}