summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2016-08-11 20:26:55 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2016-08-11 20:32:53 -0400
commit6c6bf0284642a7fe1138888d6c3044a6f4912468 (patch)
tree09f7b719bb5df31b24a295a6238be4231ed2a7b3
parent045a53f469fbede582cdbbd8ba532244d86d488e (diff)
downloadmongo-6c6bf0284642a7fe1138888d6c3044a6f4912468.tar.gz
SERVER-25507 fix for 'options is undefined'
-rw-r--r--src/mongo/shell/replsettest.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js
index 5634ba016a8..570ef6d13c2 100644
--- a/src/mongo/shell/replsettest.js
+++ b/src/mongo/shell/replsettest.js
@@ -915,8 +915,7 @@ var ReplSetTest = function(opts) {
}
// If restarting a node, use its existing options as the defaults.
- options.restart = options.restart || restart;
- if (options.restart) {
+ if ((options && options.restart) || restart) {
options = Object.merge(this.nodes[n].fullOptions, options);
} else {
options = Object.merge(defaults, options);
@@ -924,6 +923,8 @@ var ReplSetTest = function(opts) {
options = Object.merge(options, this.nodeOptions["n" + n]);
delete options.rsConfig;
+ options.restart = options.restart || restart;
+
var pathOpts = {node: n, set: this.name};
options.pathOpts = Object.merge(options.pathOpts || {}, pathOpts);