1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-31 16:53:27 +00:00

Use isnullorwhitespace

This commit is contained in:
Bernd Schoolmann
2025-10-30 17:34:58 +01:00
parent 1806cc9402
commit 4bcd8dfc0f

View File

@@ -5,6 +5,7 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
import { EncryptedMigrator } from "@bitwarden/common/key-management/encrypted-migrator/encrypted-migrator.abstraction";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { Utils } from "@bitwarden/common/platform/misc/utils";
import {
UserKeyDefinition,
ENCRYPTED_MIGRATION_DISK,
@@ -146,7 +147,7 @@ export class DefaultEncryptedMigrationsSchedulerService
try {
const dialog = PromptMigrationPasswordComponent.open(this.dialogService);
const masterPassword = await firstValueFrom(dialog.closed);
if (masterPassword == "") {
if (Utils.isNullOrWhitespace(masterPassword)) {
await this.stateProvider.setUserState(ENCRYPTED_MIGRATION_DISMISSED, new Date(), userId);
} else {
await this.encryptedMigrator.runMigrations(