remove warning when returning false from Ox.loop and Ox.forEach

This commit is contained in:
rlx 2012-06-16 20:46:14 +00:00
parent 898cc702f5
commit 9d475e6012
2 changed files with 3 additions and 3 deletions

View file

@ -181,7 +181,7 @@ Ox.forEach = function(collection, iterator, that) {
if (Ox.hasOwn(collection, key)) { if (Ox.hasOwn(collection, key)) {
// iterator.call(that, collection[key], key, collection); // iterator.call(that, collection[key], key, collection);
if (iterator.call(that, collection[key], key, collection) === false) { if (iterator.call(that, collection[key], key, collection) === false) {
console.warn('Returning false in Ox.forEach is deprecated.'); // console.warn('Returning false in Ox.forEach is deprecated.');
break; break;
} }
} }
@ -192,7 +192,7 @@ Ox.forEach = function(collection, iterator, that) {
if (i in collection) { if (i in collection) {
// iterator.call(that, collection[i], i, collection); // iterator.call(that, collection[i], i, collection);
if (iterator.call(that, collection[i], i, collection) === false) { if (iterator.call(that, collection[i], i, collection) === false) {
console.warn('Returning false in Ox.forEach is deprecated.'); // console.warn('Returning false in Ox.forEach is deprecated.');
break; break;
} }
} }

View file

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