aboutsummaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js4
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) {