Skip to content

Commit

Permalink
(fix) Read back same record that we write
Browse files Browse the repository at this point in the history
  • Loading branch information
brent-hoover committed Feb 28, 2018
1 parent 766c97e commit 201ed6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imports/plugins/core/revisions/server/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ Products.before.update(function (userId, product, fieldNames, modifier, options)
}

Revisions.update(revisionSelector, revisionModifier);
const updatedRevision = Revisions.findOne({ documentId: product._id });
const updatedRevision = Revisions.findOne(revisionSelector);
Hooks.Events.run("afterRevisionsUpdate", userId, updatedRevision);

Logger.debug(`Revison updated for product ${product._id}.`);
Expand Down

0 comments on commit 201ed6c

Please sign in to comment.