Skip to content

Commit 09c5205

Browse files
committed
Fix bug in import function()
1 parent 724de0e commit 09c5205

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "basho-eval",
3-
"version": "8.0.0",
3+
"version": "8.0.2",
44
"main": "dist/index.js",
55
"type": "module",
66
"types": "dist/index.d.ts",

src/operators/doImport.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function evalImport(
4848
const packageJSON = JSON.parse(fs.readFileSync(pkg, "utf8"));
4949
const indexFile = packageJSON.main || "index.js";
5050
const fileToLoad = path.join(pathInNodeModules, indexFile);
51-
(global as any)[alias] = (await import(fileToLoad))[alias];
51+
(global as any)[alias] = (await import(fileToLoad))[name];
5252
} else {
5353
throw new Error(`Unable to find module ${pathToImport}.`);
5454
}

0 commit comments

Comments
 (0)