merge: fix lint error in secure-rndstr.ts (!784)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/784

Approved-by: Hazelnoot <acomputerdog@gmail.com>
Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
Marie 2024-11-27 20:40:11 +00:00
commit b6db4ef88c

View file

@ -14,8 +14,8 @@ export function secureRndstr(length = 32, { chars = LU_CHARS } = {}): string {
let str = '';
for (let i = 0; i < length; i++) {
const rand = crypto.randomInt(0, chars_len);
str += chars.charAt(rand);
const rand = crypto.randomInt(0, chars_len);
str += chars.charAt(rand);
}
return str;