diff --git a/packages/babel-plugin-transform-for-of/src/index.js b/packages/babel-plugin-transform-for-of/src/index.js index 0b964f1fd35e..30e5debb252a 100644 --- a/packages/babel-plugin-transform-for-of/src/index.js +++ b/packages/babel-plugin-transform-for-of/src/index.js @@ -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",