1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

length check on userInputs

This commit is contained in:
Kyle Spearrin 2018-12-12 19:37:06 -05:00
parent ed74f73a8c
commit 6a958afd16

View File

@ -247,7 +247,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
return null; return null;
} }
let globalUserInputs = ['bitwarden', 'bit', 'warden']; let globalUserInputs = ['bitwarden', 'bit', 'warden'];
if (userInputs != null) { if (userInputs != null && userInputs.length > 0) {
globalUserInputs = globalUserInputs.concat(userInputs); globalUserInputs = globalUserInputs.concat(userInputs);
} }
// Use a hash set to get rid of any duplicate user inputs // Use a hash set to get rid of any duplicate user inputs