Permalink
Browse files

an array of replica servers incorrectly assumed to be an options object

  • Loading branch information...
1 parent e7962fc commit cfea8b361d1590ea13bed8f273caf8aa359cd015 @rlidwka rlidwka committed Aug 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/db.js
View
@@ -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;

0 comments on commit cfea8b3

Please sign in to comment.