diff --git a/lib/index.js b/lib/index.js index 2ed52e7..abc57b9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -34,7 +34,10 @@ exports.plugin.dump = utils.toPromise(function (writableStream, opts, callback) var PouchDB = self.constructor; - var output = new PouchDB(self.name, { + // db.name replaced db._db_name in pouch 6.0.0 + /* istanbul ignore next */ + var dbName = self.name || self._db_name; + var output = new PouchDB(dbName, { adapter: 'writableStream' }); output.setupStream(writableStream);