From d31c7c2c54cda23761a73f962e3d3b1c6ea60f6c Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 11 Jan 2024 13:08:24 +0100 Subject: [PATCH] reduce diff --- src/resolve.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resolve.ts b/src/resolve.ts index 3fc833f..5647e1b 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -175,6 +175,7 @@ export async function lookupNodeModuleSubpath( ): Promise { path = normalize(fileURLToPath(path)); const { name, subpath } = parseNodeModulePath(path); + if (!name || !subpath) { return subpath; }