diff --git a/lib/compiler/passes/remove-proxy-rules.js b/lib/compiler/passes/remove-proxy-rules.js index 5aa2eb2..dc8d2f4 100644 --- a/lib/compiler/passes/remove-proxy-rules.js +++ b/lib/compiler/passes/remove-proxy-rules.js @@ -1,7 +1,6 @@ "use strict"; -let arrays = require("../../utils/arrays"), - visitor = require("../visitor"); +let visitor = require("../visitor"); /* * Removes proxy rules -- that is, rules that only delegate to other rule. @@ -28,7 +27,7 @@ function removeProxyRules(ast, options) { ast.rules.forEach((rule, i) => { if (isProxyRule(rule)) { replaceRuleRefs(ast, rule.name, rule.expression.name); - if (!arrays.contains(options.allowedStartRules, rule.name)) { + if (options.allowedStartRules.indexOf(rule.name) === -1) { indices.push(i); } }