1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-28 10:33:31 +00:00

PM-14445: Reliable null and undefined matching

Reverts `!x` or triple equals `x === null` in favor of `x == null` which matched both null and undefined for cases when both are possible.
This commit is contained in:
Maciej Zieniuk
2024-11-05 12:41:48 +00:00
parent 91fc1fa630
commit b310fbcaa6
3 changed files with 36 additions and 36 deletions

View File

@@ -48,7 +48,7 @@ export class MigrateFromLegacyEncryptionComponent {
}
const activeUser = await firstValueFrom(this.accountService.activeAccount$);
if (activeUser === null) {
if (activeUser == null) {
throw new Error("No active user.");
}
@@ -59,7 +59,7 @@ export class MigrateFromLegacyEncryptionComponent {
}
const masterPassword = this.formGroup.value.masterPassword;
if (!masterPassword) {
if (masterPassword == null) {
throw new Error("Master password cannot be empty.");
}