diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-02-26 05:58:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-26 05:58:26 +0800 |
commit | 13be50a4a9e34d65fef834625f44545e849fed02 (patch) | |
tree | 2b4be9da6a6d7ded94d97b14b78274293865f76b /lib/compress.js | |
parent | 16cd5d57a5cf7f5750104df0e5af246708fd493f (diff) | |
download | tracifyjs-13be50a4a9e34d65fef834625f44545e849fed02.tar.gz tracifyjs-13be50a4a9e34d65fef834625f44545e849fed02.zip |
faster tree transversal (#1462)
- convert `[].forEach()` to for-loops
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index ccd6e23c..53833115 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1911,7 +1911,7 @@ merge(Compressor.prototype, { // returned if nothing changed. function trim(nodes, compressor, first_in_statement) { var ret = [], changed = false; - for (var i = 0, ii = nodes.length; i < ii; i++) { + for (var i = 0, len = nodes.length; i < len; i++) { var node = nodes[i].drop_side_effect_free(compressor, first_in_statement); changed |= node !== nodes[i]; if (node) { |