aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index f0453d6a..acd15f5e 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -7124,7 +7124,9 @@ merge(Compressor.prototype, {
var def = name.definition();
def.orig[def.orig.indexOf(node)] = name;
var scope = def.scope.resolve();
- if (def.scope !== scope) scope.variables.set(def.name, def);
+ if (def.scope === scope) return;
+ def.scope = scope;
+ scope.variables.set(def.name, def);
}),
value: defn.value
});