diff --git a/boot/boot.js b/boot/boot.js index e4a814d8f..0be9aa274 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -73,13 +73,11 @@ Iterate through all the own properties of an object or array. Callback is invoke $tw.utils.each = function(object,callback) { var f; if(object) { - if($tw.utils.isArray(object)) { - for(f=0; f=0; t--) { + p = value.indexOf(array[t]); + if(p !== -1) { + array.splice(t,1); + } + } + } } + // Push the values on top of the main array + array.push.apply(array,value); } - // Push the values on top of the main array - array.push.apply(array,value); } else { p = array.indexOf(value); if(p !== -1) {