diff --git a/angular/src/directives/api-action.directive.ts b/angular/src/directives/api-action.directive.ts index 8fb2574bf7..ed119a3699 100644 --- a/angular/src/directives/api-action.directive.ts +++ b/angular/src/directives/api-action.directive.ts @@ -32,7 +32,7 @@ export class ApiActionDirective implements OnChanges { this.el.nativeElement.loading = false; if ( - (e instanceof ErrorResponse || e.constructor.name === "ErrorResponse") && + (e instanceof ErrorResponse || e.constructor.name === ErrorResponse.name) && (e as ErrorResponse).captchaRequired ) { this.logService.error("Captcha required error response: " + e.getSingleMessage()); diff --git a/common/src/services/cipher.service.ts b/common/src/services/cipher.service.ts index ec98c34763..0c5a9eaab8 100644 --- a/common/src/services/cipher.service.ts +++ b/common/src/services/cipher.service.ts @@ -1029,7 +1029,7 @@ export class CipherService implements CipherServiceAbstraction { ciphers[c.id].revisionDate = c.revisionDate; }; - if (cipher.constructor.name === "Array") { + if (cipher.constructor.name === Array.name) { (cipher as { id: string; revisionDate: string }[]).forEach(clearDeletedDate); } else { clearDeletedDate(cipher as { id: string; revisionDate: string }); diff --git a/node/src/cli/commands/login.command.ts b/node/src/cli/commands/login.command.ts index db6d0f615e..f8c9a6b97d 100644 --- a/node/src/cli/commands/login.command.ts +++ b/node/src/cli/commands/login.command.ts @@ -467,7 +467,7 @@ export class LoginCommand { } catch (e) { if ( e instanceof ErrorResponse || - (e.constructor.name === "ErrorResponse" && + (e.constructor.name === ErrorResponse.name && (e as ErrorResponse).message.includes("Captcha is invalid")) ) { return badCaptcha;