Remove Array.isArray polyfill code

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Platform 3 05/15/15
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are two Array.isArray polyfills that I believe can be safely removed or replaced by plain Array.isArray calls:

      src/mongo/shell/mongo.js (introduced by SERVER-18198):

      var isArray = function(maybeArray) {
          return Object.prototype.toString.call(maybeArray) === '[object Array]';
      };
      

      src/mongo/shell/types.js:

      if (typeof Array.isArray != "function"){
          Array.isArray = function(arr){
              return arr != undefined && arr.constructor == Array
          }
      }
      

              Assignee:
              Adam Midvidy (Inactive)
              Reporter:
              Kamran K. (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: