remove Ox.Break
This commit is contained in:
parent
4139e171ca
commit
bda90f6b6b
44 changed files with 152 additions and 165 deletions
|
|
@ -60,17 +60,17 @@
|
|||
function iterate() {
|
||||
Ox.forEach(keys.slice(i), function(key) {
|
||||
if (key in collection) {
|
||||
try {
|
||||
iterator.call(that, collection[key], key, collection);
|
||||
} catch (error) {
|
||||
if (error === Ox.BreakError) {
|
||||
i = n;
|
||||
}
|
||||
throw error;
|
||||
if (iterator.call(
|
||||
that, collection[key], key, collection
|
||||
) === false) {
|
||||
i = n;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
+new Date() >= time + ms && Ox.Break();
|
||||
if (+new Date() >= time + ms) {
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
if (i < n) {
|
||||
setTimeout(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue