diff options
author | dwight <dwight@10gen.com> | 2011-10-12 01:55:02 -0400 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2011-10-12 01:55:02 -0400 |
commit | 23a75f9cf4ef9de37928bb0d495dfc214837964f (patch) | |
tree | 8cc038069ac1b1fc72037f2364eff3f3a27830b6 /shell | |
parent | 0198a3c09726c3e85956e8cbd0bf363d05c74ac4 (diff) | |
download | mongo-23a75f9cf4ef9de37928bb0d495dfc214837964f.tar.gz |
fix buildbot; not my breakage :-)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/mongo_vstudio.cpp | 10 | ||||
-rw-r--r-- | shell/utils.js | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/shell/mongo_vstudio.cpp b/shell/mongo_vstudio.cpp index 4ef1eaaddaa..b4fb64b93e2 100644 --- a/shell/mongo_vstudio.cpp +++ b/shell/mongo_vstudio.cpp @@ -321,6 +321,14 @@ const StringData _jscode_raw_utils = "return this.replace(/\\s+$/,\"\");\n" "}\n" "\n" +"String.prototype.startsWith = function (str){\n" +"return this.indexOf(str) == 0\n" +"}\n" +"\n" +"String.prototype.endsWith = function (str){\n" +"return new RegExp( str + \"$\" ).test( this )\n" +"}\n" +"\n" "Number.prototype.zeroPad = function(width) {\n" "var str = this + '';\n" "while (str.length < width)\n" @@ -506,7 +514,7 @@ const StringData _jscode_raw_utils = "\n" "if( typeof Array.isArray != \"function\" ){\n" "Array.isArray = function( arr ){\n" -"return arr.constructor == Array\n" +"return arr != undefined && arr.constructor == Array\n" "}\n" "}\n" "\n" diff --git a/shell/utils.js b/shell/utils.js index 841793b45ba..a3c1d580bf5 100644 --- a/shell/utils.js +++ b/shell/utils.js @@ -509,7 +509,7 @@ Array.stdDev = function( arr ){ if( typeof Array.isArray != "function" ){ Array.isArray = function( arr ){ - return arr.constructor == Array + return arr != undefined && arr.constructor == Array } } |