[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-01-12 15:06:20 +00:00
committed by GitHub
parent fe5efd7651
commit 13b64e45ec

View File

@@ -6,9 +6,10 @@ export const generateRandomPassword = (
length: number = DEFAULT_PASSWORD_LENGTH, length: number = DEFAULT_PASSWORD_LENGTH,
charset: string = DEFAULT_PASSWORD_CHARSET, charset: string = DEFAULT_PASSWORD_CHARSET,
) => { ) => {
const safeLength = Number.isFinite(length) && length > 0 const safeLength =
? Math.floor(length) Number.isFinite(length) && length > 0
: DEFAULT_PASSWORD_LENGTH; ? Math.floor(length)
: DEFAULT_PASSWORD_LENGTH;
if (safeLength <= 0 || charset.length === 0) { if (safeLength <= 0 || charset.length === 0) {
return ""; return "";