diff --git a/packages/babel-core/src/transformation/plugin.js b/packages/babel-core/src/transformation/plugin.js index 467c6b3299..a19b6570b3 100644 --- a/packages/babel-core/src/transformation/plugin.js +++ b/packages/babel-core/src/transformation/plugin.js @@ -82,7 +82,7 @@ export default class Plugin extends Store { } normaliseVisitor(visitor: Object): Object { - for (let key of visitor) { + for (let key of GLOBAL_VISITOR_PROPS) { if (visitor[key]) { throw new Error(`Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.`); }