fix: code linting

This commit is contained in:
Aetherinox 2024-04-22 11:12:29 -07:00
parent a425b9904b
commit 406e908bb5
No known key found for this signature in database
GPG Key ID: CB5C4C30CD0D4028
1 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,10 @@ const Otp = function (url, params) {
throw 'Empty secret';
}
if (params.algorithm && ['SHA1', 'SHA256', 'SHA512'].indexOf(params.algorithm.toUpperCase()) < 0) {
if (
params.algorithm &&
['SHA1', 'SHA256', 'SHA512'].indexOf(params.algorithm.toUpperCase()) < 0
) {
throw 'Bad algorithm: ' + params.algorithm;
}