Skip to content

Commit

Permalink
revert 7f6187a
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiosantoscode committed Mar 16, 2023
1 parent f0bd612 commit ad25da4
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions lib/compress/reduce-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,17 +447,7 @@ def_reduce_vars(AST_Default, function(tw, descend) {

function mark_lambda(tw, descend, compressor) {
clear_flag(this, INLINED);

// Sometimes we detach the lambda for safety, and instead of push()
// we go to an entirely fresh lineage of safe_ids.
let previous_safe_ids;
if (this instanceof AST_Defun || this.uses_arguments || this.pinned()) {
previous_safe_ids = tw.safe_ids;
tw.safe_ids = Object.create(null);
} else {
push(tw);
}

push(tw);
reset_variables(tw, compressor, this);

var iife;
Expand Down Expand Up @@ -488,13 +478,9 @@ function mark_lambda(tw, descend, compressor) {
}
});
}
descend();

if (previous_safe_ids) {
tw.safe_ids = previous_safe_ids;
} else {
pop(tw);
}
descend();
pop(tw);

return true;
}
Expand Down

0 comments on commit ad25da4

Please sign in to comment.