Browse Source

Check runtime name vs mangled name (#724)

PS-589-2fa-device-verification-settings
Matt Gibson 4 years ago committed by GitHub
parent
commit
3ec0f6977a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      angular/src/directives/api-action.directive.ts
  2. 2
      common/src/services/cipher.service.ts
  3. 2
      node/src/cli/commands/login.command.ts

2
angular/src/directives/api-action.directive.ts

@ -32,7 +32,7 @@ export class ApiActionDirective implements OnChanges { @@ -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());

2
common/src/services/cipher.service.ts

@ -1029,7 +1029,7 @@ export class CipherService implements CipherServiceAbstraction { @@ -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 });

2
node/src/cli/commands/login.command.ts

@ -467,7 +467,7 @@ export class LoginCommand { @@ -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;

Loading…
Cancel
Save