Skip to content

Commit

Permalink
(#2735) - always populate the default constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Sep 5, 2014
1 parent d3d1f2a commit c7865d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/replicate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

var utils = require('./utils');
var EE = require('events').EventEmitter;
var Pouch = require('./index');

var MAX_SIMULTANEOUS_REVS = 50;

Expand Down Expand Up @@ -552,7 +553,7 @@ function replicate(repId, src, target, opts, returnValue) {


function toPouch(db, opts) {
var PouchConstructor = opts.PouchConstructor;
var PouchConstructor = opts.PouchConstructor || Pouch;
if (typeof db === 'string') {
return new PouchConstructor(db);
} else if (db.then) {
Expand Down

0 comments on commit c7865d9

Please sign in to comment.