Skip to content

Commit

Permalink
Throw on unsupported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Apr 9, 2020
1 parent eda6528 commit 038be87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/babel-plugin-transform-for-of/src/index.js
Expand Up @@ -20,6 +20,13 @@ export default declare((api, options) => {
);
}

// TODO: Remove in Babel 8
if (allowArrayLike && api.version.test(/^7\.\d\./)) {
throw new Error(
`The allowArrayLike is only supported when using @babel/core@^7.10.0`,
);
}

if (assumeArray) {
return {
name: "transform-for-of",
Expand Down

0 comments on commit 038be87

Please sign in to comment.