Skip to content

Commit

Permalink
Transform can be simplified when clone is not done. (#2621)
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejSpanel authored and alexlamsl committed Dec 19, 2017
1 parent 032f096 commit 01057cf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/transform.js
Expand Up @@ -60,12 +60,9 @@ TreeTransformer.prototype = new TreeWalker;
tw.push(this);
if (tw.before) x = tw.before(this, descend, in_list);
if (x === undefined) {
if (!tw.after) {
x = this;
descend(x, tw);
} else {
tw.stack[tw.stack.length - 1] = x = this;
descend(x, tw);
x = this;
descend(x, tw);
if (tw.after) {
y = tw.after(x, in_list);
if (y !== undefined) x = y;
}
Expand Down

0 comments on commit 01057cf

Please sign in to comment.