1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-23 21:31:29 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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