Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18284

Remove Array.isArray polyfill code

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

      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 Adam Midvidy
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: