summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/mongo.js6
-rw-r--r--src/mongo/shell/types.js6
2 files changed, 1 insertions, 11 deletions
diff --git a/src/mongo/shell/mongo.js b/src/mongo/shell/mongo.js
index 6b5891bf3ee..41f5b1fe978 100644
--- a/src/mongo/shell/mongo.js
+++ b/src/mongo/shell/mongo.js
@@ -149,10 +149,6 @@ Mongo.prototype.getReadPrefTagSet = function () {
return this._readPrefTagSet;
};
-var isArray = function(maybeArray) {
- return Object.prototype.toString.call(maybeArray) === '[object Array]';
-};
-
// Returns a readPreference object of the type expected by mongos.
Mongo.prototype.getReadPref = function () {
var obj = {}, mode, tagSet;
@@ -164,7 +160,7 @@ Mongo.prototype.getReadPref = function () {
}
// Server Selection Spec: - if readPref mode is "primary" then the tags field MUST
// be absent. Ensured by setReadPref.
- if (isArray(tagSet = this.getReadPrefTagSet())) {
+ if (Array.isArray(tagSet = this.getReadPrefTagSet())) {
obj.tags = tagSet;
}
diff --git a/src/mongo/shell/types.js b/src/mongo/shell/types.js
index 6ade032f65e..af529d63a1a 100644
--- a/src/mongo/shell/types.js
+++ b/src/mongo/shell/types.js
@@ -214,12 +214,6 @@ Array.stdDev = function(arr){
return Math.sqrt(sum / arr.length);
}
-if (typeof Array.isArray != "function"){
- Array.isArray = function(arr){
- return arr != undefined && arr.constructor == Array
- }
-}
-
// Object
Object.extend = function(dst, src, deep){
for (var k in src){