summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-09-15 16:06:08 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2016-09-15 16:06:08 -0400
commit24c134c4fc2117c893f44902876a7ca329dccef5 (patch)
tree06e69745c9c326718a57f6830a01b70a4a6a786a
parent872bf6a043101ee3fcdc78bfc3643c81c270fd9b (diff)
downloadmongo-24c134c4fc2117c893f44902876a7ca329dccef5.tar.gz
SERVER-25488 __sanitizeMatch needs a check for null
-rw-r--r--src/mongo/shell/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index 225eba959bd..a7c9fe4c9a8 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -158,7 +158,7 @@ if (typeof TestData == "undefined") {
function __sanitizeMatch(flag) {
var sanitizeMatch = /-fsanitize=([^\s]+) /.exec(getBuildInfo()["buildEnvironment"]["ccflags"]);
- if (flag && RegExp(flag).exec(sanitizeMatch[1])) {
+ if (flag && sanitizeMatch && RegExp(flag).exec(sanitizeMatch[1])) {
return true;
} else {
return false;