fix: tests for passphrases

This commit is contained in:
Aetherinox 2024-04-21 10:36:41 -07:00
parent dde3dde298
commit 1a7519cac1
No known key found for this signature in database
GPG Key ID: CB5C4C30CD0D4028
1 changed files with 3 additions and 3 deletions

View File

@ -35,15 +35,15 @@ const PasswordGenerator = {
return '';
}
if (opts.name.toLowerCase() === 'uuid') {
if (opts.name && opts.name.toLowerCase() === 'uuid') {
return this.generateUUIDv4(opts);
}
if (opts.name.toLowerCase() === 'passphrase') {
if (opts.name && opts.name.toLowerCase() === 'passphrase') {
return this.generatePassphrase(opts);
}
if (opts.name.toLowerCase() === 'pronounceable') {
if (opts.name && opts.name.toLowerCase() === 'pronounceable') {
return this.generatePronounceable(opts);
}