Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6 from rlidwka/an-array-fix

an array of replica servers incorrectly assumed to be an options object
  • Loading branch information...
commit 15bfb31846c03af4232414d82820b5e4c12b9989 2 parents e7962fc + cfea8b3
@milewise milewise authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/db.js
View
4 lib/db.js
@@ -11,7 +11,7 @@ var Database = function(name, servers, options) {
serverConfig;
// handle case where name is a mongodb uri
- if (typeof servers === 'object') {
+ if (typeof servers === 'object' && !Array.isArray(servers)) {
options = servers;
servers = null;
}
@@ -136,4 +136,4 @@ var nameFromUri = function(url) {
exports.Database = Database;
exports.ObjectID = mongodb.BSONPure.ObjectID;
-exports.BSON = mongodb.BSONPure;
+exports.BSON = mongodb.BSONPure;
Please sign in to comment.
Something went wrong with that request. Please try again.