From b7007056b0d942efee2be04ffb50ec011157f9b8 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 17 Dec 2024 08:34:11 +0100 Subject: [PATCH] refactor: remove cast --- src/env.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/env.ts b/src/env.ts index 915a7a88..d82ee05d 100644 --- a/src/env.ts +++ b/src/env.ts @@ -36,9 +36,9 @@ export function defineEnv(opts: CreateEnvOptions = {}): { if (opts.resolve) { const resolvePaths: (string | URL)[] = [ ...(opts.resolve === true ? [] : opts.resolve.paths || []), - ...(presets + ...presets .map((preset) => preset.meta?.url) - .filter(Boolean) as string[]), + .filter((v) => v !== undefined), __filename, // unenv ]; const resolveOpts: ResolveOptions = {