diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index c079adb3..ffad45c9 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -158,7 +158,8 @@ Ox.forEach = function(collection, iterator, that) { if (Ox.hasOwn(collection, key)) { // iterator.call(that, collection[key], key, collection); if (iterator.call(that, collection[key], key, collection) === false) { - throw new Error('Returning false in Ox.forEach is deprecated.'); + console.warn('Returning false in Ox.forEach is deprecated.'); + break; } } } @@ -167,7 +168,8 @@ Ox.forEach = function(collection, iterator, that) { if (i in collection) { // iterator.call(that, collection[i], i, collection); if (iterator.call(that, collection[i], i, collection) === false) { - throw new Error('Returning false in Ox.forEach is deprecated.'); + console.warn('Returning false in Ox.forEach is deprecated.'); + break; } } } diff --git a/source/Ox/js/Core.js b/source/Ox/js/Core.js index 1e40d05e..58207c6a 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -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) {