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:
parent
e9d9cd0182
commit
c77441b353
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user