Skip to content

Commit

Permalink
Fix(babel-preset-env): check api.caller is a function to avoid… (#10649)
Browse files Browse the repository at this point in the history
  • Loading branch information
love2me authored and nicolo-ribaudo committed Nov 5, 2019
1 parent 5f2240e commit f8eb290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-preset-env/src/index.js
Expand Up @@ -237,7 +237,7 @@ export default declare((api, opts) => {
modules !== "auto" || !api.caller || !api.caller(supportsStaticESM),
shouldTransformDynamicImport:
modules !== "auto" || !api.caller || !api.caller(supportsDynamicImport),
shouldParseTopLevelAwait: api.caller(supportsTopLevelAwait),
shouldParseTopLevelAwait: !api.caller || api.caller(supportsTopLevelAwait),
});

const pluginNames = filterItems(
Expand Down

0 comments on commit f8eb290

Please sign in to comment.