forked from 0x2620/oxjs
throw warning, not error, when returning false from Ox.forEach or Ox.loop
This commit is contained in:
parent
95de001d8b
commit
91026a0c77
2 changed files with 6 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue