diff --git a/web/src/utils/passwordGenerator.js b/web/src/utils/passwordGenerator.js index d804ea8..019c3bf 100644 --- a/web/src/utils/passwordGenerator.js +++ b/web/src/utils/passwordGenerator.js @@ -40,7 +40,7 @@ export function passwordGenerator(length = 8) { // ) // Add random characters to the password until it reaches the desired length - for (let i = 4; i < length; i++) { + for (let i = 3; i < length; i++) { password += characterSet.charAt( Math.floor(Math.random() * characterSet.length) ) @@ -49,9 +49,7 @@ export function passwordGenerator(length = 8) { // Shuffle the password password = password .split('') - .sort(function () { - return 0.5 - Math.random() - }) + .sort(() => 0.5 - Math.random()) .join('') return password