diff --git a/packages/babel-traverse/src/scope/binding.js b/packages/babel-traverse/src/scope/binding.js index 1578de17d4..04e9a14eda 100644 --- a/packages/babel-traverse/src/scope/binding.js +++ b/packages/babel-traverse/src/scope/binding.js @@ -71,7 +71,7 @@ export default class Binding { reassign(path: Object) { this.constant = false; - if (this.constantViolations.includes(path)) { + if (this.constantViolations.indexOf(path) !== -1) { return; } this.constantViolations.push(path);