Skip to content
Browse files

Fix queryhost options warning.

Change-Id: Ic6cacf968ca7b36c689d8b51cb63a94d155f5ea5
Reviewed-on: http://review.couchbase.org/33181
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information...
1 parent 73511ab commit d4fd6ffdec2bf64537dbe0ff92e6c30302539b9d @brett19 brett19 committed Feb 4, 2014
Showing with 10 additions and 9 deletions.
  1. +10 −9 lib/connection.js
View
19 lib/connection.js
@@ -206,6 +206,16 @@ function Connection(options, callback) {
}
}
+ if (ourObjs.queryhosts !== undefined) {
+ this.queryhosts = ourObjs.queryhosts;
+ if (!Array.isArray(this.queryhosts)) {
+ this.queryhosts = [this.queryhosts];
+ }
+ delete ourObjs.queryhosts;
+ } else {
+ this.queryhosts = null;
+ }
+
var hostKey = 'host';
var hostParam;
@@ -298,15 +308,6 @@ function Connection(options, callback) {
} catch(e) {
callback(e);
}
-
- if (options.queryhosts !== undefined) {
- this.queryhosts = options.queryhosts;
- if (!Array.isArray(this.queryhosts)) {
- this.queryhosts = [this.queryhosts];
- }
- } else {
- this.queryhosts = null;
- }
}
/**

0 comments on commit d4fd6ff

Please sign in to comment.
Something went wrong with that request. Please try again.