aboutsummaryrefslogtreecommitdiff
path: root/tools/js-optimizer.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r--tools/js-optimizer.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 8f472c3f..3a0ca529 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -1424,9 +1424,10 @@ function eliminate(ast) {
} else if (uses[name] == 0) {
var mustRemain = false;
if (values[name]) {
- traverse(values[name], function(node, value) {
+ traverse(values[name], function(node, type) {
if (!(type in NODES_WITHOUT_ELIMINATION_SIDE_EFFECTS)) {
mustRemain = true; // cannot remove this unused variable, constructing it has side effects
+ return true;
}
});
}