mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[PM-8857] fix passphrase missing number (#9634)
This commit is contained in:
@@ -51,7 +51,7 @@ export class PassphraseGeneratorStrategy
|
|||||||
// select which word gets the number, if any
|
// select which word gets the number, if any
|
||||||
let luckyNumber = -1;
|
let luckyNumber = -1;
|
||||||
if (o.includeNumber) {
|
if (o.includeNumber) {
|
||||||
luckyNumber = await this.randomizer.uniform(0, o.numWords);
|
luckyNumber = await this.randomizer.uniform(0, o.numWords - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate the passphrase
|
// generate the passphrase
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class PassphraseGeneratorStrategy
|
|||||||
// select which word gets the number, if any
|
// select which word gets the number, if any
|
||||||
let luckyNumber = -1;
|
let luckyNumber = -1;
|
||||||
if (o.includeNumber) {
|
if (o.includeNumber) {
|
||||||
luckyNumber = await this.randomizer.uniform(0, o.numWords);
|
luckyNumber = await this.randomizer.uniform(0, o.numWords - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate the passphrase
|
// generate the passphrase
|
||||||
|
|||||||
Reference in New Issue
Block a user