diff --git a/boot/boot.js b/boot/boot.js index acd9079ea4..6e613f778f 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -135,24 +135,13 @@ $tw.utils.isDate = (value) => value instanceof Date; Iterate through all the own properties of an object or array. Callback is invoked with (element,title,object) */ $tw.utils.each = function(object,callback) { - var next,f,length; if(object) { - if(Object.prototype.toString.call(object) == "[object Array]") { - for(f=0, length=object.length; f { + callback(element[1], element[0], object); + }); } } };