Fix #6430 - messing arouds with cards BS4
[roojs1] / Array.js
index bb4ebaf..4095aee 100644 (file)
--- a/Array.js
+++ b/Array.js
  */
 Roo.applyIf(Array.prototype, {
     /**
+     * 
      * Checks whether or not the specified object exists in the array.
      * @param {Object} o The object to check for
      * @return {Number} The index of o in the array (or -1 if it is not found)
      */
     indexOf : function(o){
        for (var i = 0, len = this.length; i < len; i++){
-             if(this[i] == o) return i;
+             if(this[i] == o) { return i; }
        }
           return -1;
     },
@@ -38,18 +39,19 @@ Roo.applyIf(Array.prototype, {
      * Map (JS 1.6 compatibility)
      * @param {Function} function  to call
      */
-    map : function(fun /*, thisp*/)
+    map : function(fun )
     {
         var len = this.length >>> 0;
-        if (typeof fun != "function")
+        if (typeof fun != "function") {
             throw new TypeError();
-
+        }
         var res = new Array(len);
         var thisp = arguments[1];
         for (var i = 0; i < len; i++)
         {
-            if (i in this)
+            if (i in this) {
                 res[i] = fun.call(thisp, this[i], i, this);
+            }
         }
 
         return res;
@@ -58,8 +60,4 @@ Roo.applyIf(Array.prototype, {
 });
 
 
-
-if (!Array.prototype.map)
-{
-  Array.prototype.
-}
\ No newline at end of file