From af2cab3fce30277aca0f9776867e5ff9a81f2d3f Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 9 Sep 2016 17:11:45 -0700 Subject: [PATCH] fix db.name for backwards compat --- lib/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);