Skip to content

Commit f9c7f54

Browse files
committed
Added extra check for imports object
1 parent 2022e5e commit f9c7f54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/get-exports.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function resolvePackageImports (specifier, fromUrl) {
5050

5151
// Look for path inside packageJson
5252
let resolvedExport
53-
if (typeof imports === 'object') {
53+
if (imports && typeof imports === 'object') {
5454
const requireExport = imports.require
5555
const importExport = imports.import
5656
// look for the possibility of require and import which is standard for CJS/ESM

0 commit comments

Comments
 (0)