From 6b3aeff1d8975f769f7e251c23405baf3a6f2b5a Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 3 Jul 2017 03:23:38 +0800 Subject: clean up `TreeWalker.pop()` (#2195) Remove superfluous parameter. --- lib/ast.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/ast.js') diff --git a/lib/ast.js b/lib/ast.js index 2972b7aa..0918574d 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -859,7 +859,7 @@ TreeWalker.prototype = { if (!ret && descend) { descend.call(node); } - this.pop(node); + this.pop(); return ret; }, parent: function(n) { @@ -873,9 +873,8 @@ TreeWalker.prototype = { } this.stack.push(node); }, - pop: function(node) { - this.stack.pop(); - if (node instanceof AST_Lambda) { + pop: function() { + if (this.stack.pop() instanceof AST_Lambda) { this.directives = Object.getPrototypeOf(this.directives); } }, -- cgit v1.2.3