diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-06-21 14:10:37 +0800 |
---|---|---|
committer | alexlamsl <alexlamsl@gmail.com> | 2018-06-24 04:00:21 +0800 |
commit | 766a4147d4891a093b550e958268c48104330b52 (patch) | |
tree | 169df532a88775e8128715aff079821934f4ca9b /lib/utils.js | |
parent | 915c7e234d0788b0ef502e2c6343d513474c390a (diff) | |
download | tracifyjs-766a4147d4891a093b550e958268c48104330b52.tar.gz tracifyjs-766a4147d4891a093b550e958268c48104330b52.zip |
enhance `arguments` (#3193)
fixes #3192
Diffstat (limited to 'lib/utils.js')
-rw-r--r-- | lib/utils.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/utils.js b/lib/utils.js index ca4b2d4b..7a51fb80 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -52,9 +52,7 @@ function member(name, array) { } function find_if(func, array) { - for (var i = 0, n = array.length; i < n; ++i) { - if (func(array[i])) return array[i]; - } + for (var i = array.length; --i >= 0;) if (func(array[i])) return array[i]; } function repeat_string(str, i) { |