aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/compress.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 3efca411..c384e997 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -199,7 +199,7 @@ merge(Compressor.prototype, {
};
function tighten_body(statements, compressor) {
- var CHANGED;
+ var CHANGED, max_iter = 10;
do {
CHANGED = false;
if (compressor.option("angular")) {
@@ -218,7 +218,7 @@ merge(Compressor.prototype, {
if (compressor.option("join_vars")) {
statements = join_consecutive_vars(statements, compressor);
}
- } while (CHANGED);
+ } while (CHANGED && max_iter-- > 0);
if (compressor.option("negate_iife")) {
negate_iifes(statements, compressor);