diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 179c2ec84..db05ebd3b 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -82,7 +82,7 @@ export function validateName(name: string): boolean { return !( !normalizedName.match(/^[-a-zA-Z0-9_.!~*'()@]+$/) || normalizedName.startsWith('.') || // ".bin", etc. - ['node_modules', '__proto__', 'favicon.ico'].indexOf(normalizedName) !== -1 + ['node_modules', '__proto__', 'favicon.ico'].includes(normalizedName) ); }