From 19dc5bc956e9e67fc1939df38ce337a58f858deb Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Mon, 25 Sep 2023 15:40:52 -0700 Subject: [PATCH] fix(compartment-mapper): Import main as . --- packages/compartment-mapper/src/import-hook.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/compartment-mapper/src/import-hook.js b/packages/compartment-mapper/src/import-hook.js index eab862d4ee..e3a58029f8 100644 --- a/packages/compartment-mapper/src/import-hook.js +++ b/packages/compartment-mapper/src/import-hook.js @@ -251,10 +251,8 @@ export const makeImportHookMaker = ( // Collate candidate locations for the moduleSpecifier, // to support Node.js conventions and similar. const candidates = [moduleSpecifier]; - if (moduleSpecifier !== '.') { - for (const candidateSuffix of searchSuffixes) { - candidates.push(`${moduleSpecifier}${candidateSuffix}`); - } + for (const candidateSuffix of searchSuffixes) { + candidates.push(`${moduleSpecifier}${candidateSuffix}`); } const { maybeRead } = unpackReadPowers(readPowers);