From fe582ab37cdb64aa5afa95cc38b33e3a58857013 Mon Sep 17 00:00:00 2001 From: Oscar Otero Date: Wed, 8 Jan 2025 00:40:22 +0100 Subject: [PATCH] fix linter issue --- deps/import_map.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/import_map.ts b/deps/import_map.ts index 992a3889..64dff80e 100644 --- a/deps/import_map.ts +++ b/deps/import_map.ts @@ -12,10 +12,13 @@ export function getResolver( fixImportMap(resolvedImportMap); return function resolveSpecifier(specifier: string, fromURL?: string) { + const from = fromURL && URL.canParse(fromURL) + ? new URL(fromURL) + : importMapBaseURL; return resolveModuleSpecifier( specifier, resolvedImportMap, - importMapBaseURL, + from, ); }; }