WIP ESLint fixes

This commit is contained in:
2025-03-28 11:35:51 +01:00
parent 4b9df95721
commit 9a905e83f7
40 changed files with 92 additions and 91 deletions

View File

@ -44,7 +44,7 @@ export function IPInputWithMask(p: {
return;
}
const split = v?.split("/");
const split = v.split("/");
const ip =
p.version === 4 ? sanitizeIpV4(split[0]) : sanitizeIpV6(split[0]);
let mask = undefined;
@ -69,7 +69,7 @@ export function IPInputWithMask(p: {
function sanitizeIpV4(s: string | undefined): string | undefined {
if (s === "" || s === undefined) return s;
let split = s.split(".");
const split = s.split(".");
if (split.length > 4) split.splice(4);
let needAnotherIteration = false;
@ -106,7 +106,7 @@ function sanitizeIpV6(s: string | undefined): string | undefined {
const num = parseInt(e, 16);
if (isNaN(num)) return "0";
let s = num.toString(16);
const s = num.toString(16);
if (num > 0xffff) {
needAnotherIteration = true;
return s.slice(0, 4) + ":" + s.slice(4);