From 1010c505bb3410a652cc44debee860262af1672a Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 7 Dec 2018 05:40:10 +0000 Subject: [PATCH] Minor readability improvement for readable passwords --- passmate.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/passmate.js b/passmate.js index 38f74e2..0e14a78 100644 --- a/passmate.js +++ b/passmate.js @@ -293,9 +293,14 @@ class PassMate { } for (let [info, container] of this.readablePasswords) { - let choices = new Array(6); - choices.fill(this.WORDS, 0, 3); - choices.fill(this.SAFE_NUM, 3, 6); + let choices = [ + this.WORDS, + this.WORDS, + this.WORDS, + this.SAFE_NUM, + this.SAFE_NUM, + this.SAFE_NUM, + ]; this.deriveValidArray(key, info, choices, this.validatePassword.bind(this)) .then((arr) => { container.innerText = arr.join('');