From 77f4d8f3b990096f1ea6636be2865563150860de Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 23 May 2012 17:48:17 +0200 Subject: [PATCH] typos --- source/Ox/js/Async.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Ox/js/Async.js b/source/Ox/js/Async.js index 84f43c5a..070f78f9 100644 --- a/source/Ox/js/Async.js +++ b/source/Ox/js/Async.js @@ -32,7 +32,7 @@ (col, iterator[, that], callback[, ms]) -> undefined @*/ Ox.nonblockingForEach = function(col, iterator, that, callback, ms) { - var i, keys, last = Ox.last(arguments), n, time = +new Date(); + var i, keys, last = Ox.last(arguments), n, time, type = Ox.typeOf(col); callback = Ox.isFunction(last) ? last : arguments[arguments.length - 2]; col = type == 'array' || type == 'object' ? col : Ox.toArray(col); keys = type == 'object' ? Object.keys(col) : Ox.range(col.length); @@ -41,6 +41,7 @@ that = arguments.length == 5 || ( arguments.length == 4 && Ox.isFunction(last) ) ? that : null; + time = +new Date(); iterate(); function iterate() { keys[i] in col && iterator.call(that, col[keys[i]], keys[i], col, function() { @@ -49,7 +50,7 @@ iterate(); } else { setTimeout(function() { - time += new Date(); + time = +new Date(); iterate(); }); }