Use correct data on replace callback

Previously, it would just pass the old data
Pass the new data as cloudant updates the _rev property on CRUD
This commit is contained in:
ssh24 2017-05-16 20:16:45 -04:00
parent 22428cd58c
commit 54f67dc3b0
1 changed files with 3 additions and 1 deletions

View File

@ -3059,7 +3059,9 @@ DataAccessObject.replaceById = function(id, data, options, cb) {
function replaceCallback(err, data) {
if (err) return cb(err);
if (typeof connector.generateContextData === 'function') {
context = connector.generateContextData(context, data);
}
var ctx = {
Model: Model,
hookState: hookState,