aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 832f64f2..77636cb2 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -710,19 +710,19 @@ merge(Compressor.prototype, {
def(AST_VarDef, function(tw, descend) {
var node = this;
var d = node.name.definition();
- if (safe_to_assign(tw, d, node.value)) {
- if (node.value) {
+ if (node.value) {
+ if (safe_to_assign(tw, d, node.value)) {
d.fixed = function() {
return node.value;
};
tw.loop_ids[d.id] = tw.in_loop;
mark(tw, d, false);
descend();
+ mark(tw, d, true);
+ return true;
+ } else {
+ d.fixed = false;
}
- mark(tw, d, true);
- return true;
- } else if (node.value) {
- d.fixed = false;
}
});
def(AST_While, function(tw) {