[PM-8857] fix passphrase missing number (#9634)
This commit is contained in:
parent
6e7239e05e
commit
44b5971458
|
@ -51,7 +51,7 @@ export class PassphraseGeneratorStrategy
|
|||
// select which word gets the number, if any
|
||||
let luckyNumber = -1;
|
||||
if (o.includeNumber) {
|
||||
luckyNumber = await this.randomizer.uniform(0, o.numWords);
|
||||
luckyNumber = await this.randomizer.uniform(0, o.numWords - 1);
|
||||
}
|
||||
|
||||
// generate the passphrase
|
||||
|
|
|
@ -47,7 +47,7 @@ export class PassphraseGeneratorStrategy
|
|||
// select which word gets the number, if any
|
||||
let luckyNumber = -1;
|
||||
if (o.includeNumber) {
|
||||
luckyNumber = await this.randomizer.uniform(0, o.numWords);
|
||||
luckyNumber = await this.randomizer.uniform(0, o.numWords - 1);
|
||||
}
|
||||
|
||||
// generate the passphrase
|
||||
|
|
Loading…
Reference in New Issue