1
0
Fork 0
forked from 0x2620/oxjs

throw warning, not error, when returning false from Ox.forEach or Ox.loop

This commit is contained in:
rolux 2012-05-30 19:25:18 +02:00
commit 91026a0c77
2 changed files with 6 additions and 3 deletions

View file

@ -275,7 +275,8 @@ Ox.loop = function() {
for (i = start; step > 0 ? i < stop : i > stop; i += step) {
// iterator(i);
if (iterator(i) === false) {
throw new Error('Returning false in Ox.loop is deprecated.');
console.warn('Returning false in Ox.loop is deprecated.');
break;
}
}
} catch (error) {