Skip to content

Commit

Permalink
balderdashy#2813 clone the object to prevent circular references in t…
Browse files Browse the repository at this point in the history
…he pubsub hook
  • Loading branch information
particlebanana committed Apr 23, 2015
1 parent 442f92c commit eae6e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hooks/blueprints/actions/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = function updateOneRecord (req, res) {
if (req._sails.hooks.pubsub) {
if (req.isSocket) { Model.subscribe(req, records); }
Model.publishUpdate(pk, _.cloneDeep(values), !req.options.mirror && req, {
previous: matchingRecord.toJSON()
previous: _.cloneDeep(matchingRecord.toJSON())
});
}

Expand Down

0 comments on commit eae6e2c

Please sign in to comment.