diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-20 15:19:03 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-20 15:19:03 -0800 |
commit | 7aee177b50949d4c7613f14b4537773dff5bcdfb (patch) | |
tree | 701175f1dfd4898c7aaa16958a1782fc3d42ad29 /tools/js-optimizer.js | |
parent | c58ae6c01c046387c6a57ae0c250e49b6c57e5cc (diff) |
fix js optimizer bug
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 4d4ff1a9..bc5d5d8c 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -398,8 +398,7 @@ function hoistMultiples(ast) { } if (postInner[0] != 'if') continue; // Look into this if, and its elseifs - while (postInner) { - assert(postInner[0] == 'if'); + while (postInner && postInner[0] == 'if') { var cond = postInner[1]; if (cond[0] == 'binary' && cond[1] == '==' && cond[2][0] == 'name' && cond[2][1] == '__label__') { assert(cond[3][0] == 'num'); |