From abc9506010f189f98699d753f01cd2c06f1af24e Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 12 Dec 2023 11:45:33 -0800 Subject: [PATCH] fix: unchecked index access on `bundleInfo`. --- src/transform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transform.ts b/src/transform.ts index 476fede..cddc9ac 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -285,7 +285,7 @@ export function transformModule( let importedPromiseCount = 0; for (const importDeclaration of imports) { const importedModuleName = resolveImport(moduleName, importDeclaration.source.value); - if (!importedModuleName) continue; + if (!importedModuleName || !bundleInfo[importedModuleName]) continue; if (bundleInfo[importedModuleName].transformNeeded) { importDeclaration.specifiers.push(