1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

check credential type explicitly when loading evaluator (#7791)

This commit is contained in:
✨ Audrey ✨ 2024-02-09 11:33:52 -05:00 committed by GitHub
parent bb031f6779
commit 64381cbae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,8 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
options.type = policy.defaultType;
}
const evaluator = options.type
const evaluator =
options.type == "password"
? new PasswordGeneratorOptionsEvaluator(policy)
: new PassphraseGeneratorOptionsEvaluator(policy);
@ -344,7 +345,8 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
options: PasswordGeneratorOptions,
enforcedPolicyOptions: PasswordGeneratorPolicyOptions,
) {
const evaluator = options.type
const evaluator =
options.type == "password"
? new PasswordGeneratorOptionsEvaluator(enforcedPolicyOptions)
: new PassphraseGeneratorOptionsEvaluator(enforcedPolicyOptions);