Skip to content

Commit bab1ccc

Browse files
committed
fix: simplify algorithm name extraction in TOTP URI generation
Remove unnecessary optional chaining for algorithm name replacement, streamlining the code for generating TOTP authentication URI.
1 parent 746f615 commit bab1ccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export function getTOTPAuthUri({
186186
const params = new URLSearchParams({
187187
secret,
188188
issuer,
189-
algorithm: algorithm.algorithm?.replaceAll('-', ''),
189+
algorithm: algorithm.replaceAll('-', ''),
190190
digits: digits.toString(),
191191
period: period.toString(),
192192
})

0 commit comments

Comments
 (0)