Skip to content

Commit af2cab3

Browse files
committed
fix db.name for backwards compat
1 parent ce46d63 commit af2cab3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ exports.plugin.dump = utils.toPromise(function (writableStream, opts, callback)
3434

3535
var PouchDB = self.constructor;
3636

37-
var output = new PouchDB(self.name, {
37+
// db.name replaced db._db_name in pouch 6.0.0
38+
/* istanbul ignore next */
39+
var dbName = self.name || self._db_name;
40+
var output = new PouchDB(dbName, {
3841
adapter: 'writableStream'
3942
});
4043
output.setupStream(writableStream);

0 commit comments

Comments
 (0)