Skip to content

Commit f8eb290

Browse files
love2menicolo-ribaudo
authored andcommitted
Fix(babel-preset-env): check api.caller is a function to avoid… (#10649)
1 parent 5f2240e commit f8eb290

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/babel-preset-env/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export default declare((api, opts) => {
237237
modules !== "auto" || !api.caller || !api.caller(supportsStaticESM),
238238
shouldTransformDynamicImport:
239239
modules !== "auto" || !api.caller || !api.caller(supportsDynamicImport),
240-
shouldParseTopLevelAwait: api.caller(supportsTopLevelAwait),
240+
shouldParseTopLevelAwait: !api.caller || api.caller(supportsTopLevelAwait),
241241
});
242242

243243
const pluginNames = filterItems(

0 commit comments

Comments
 (0)