Closed
Description
Since PouchDB 6.0.3, the incoming
handler runs twice when using the .bulkDocs
method. You can demostrate this issue with this snippet:
const PouchDB = require('pouchdb')
PouchDB.plugin(require('transform-pouch'))
const db = new PouchDB('.test')
let i = 0
db.transform({
incoming: function (doc) {
i++
return doc
}
})
Promise.resolve().then(async () => {
await db.bulkDocs([{ _id: 'a' }])
console.log(i === 2)
}).catch((err) => {
console.error(err)
}).then(db.destroy)
Metadata
Metadata
Assignees
Labels
No labels