Skip to content

Commit

Permalink
Revert "Fix #2636 RangeError: Maximum call stack size exceeded on Pub…
Browse files Browse the repository at this point in the history
…Sub hook"
  • Loading branch information
mikermcneil committed Feb 17, 2015
1 parent e4f2a26 commit 2d62a0a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

### master

* [BUGFIX] Fix [RangeError: Maximum call stack size exceeded] error in PubSub hook
* [ENHANCEMENT] Support layout for Ractive template engine


Expand Down
6 changes: 1 addition & 5 deletions lib/hooks/pubsub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ module.exports = function(sails) {
var id = record[this.primaryKey] || record;
// Get the socket room to publish to
var room = this.room(id, "message");

// Ensure that we're working with a clean, unencumbered object
data = _.cloneDeep(data);

// Create the payload
var payload = {
verb: "messaged",
Expand Down Expand Up @@ -541,7 +537,7 @@ module.exports = function(sails) {
options = options || {};

// Ensure that we're working with a clean, unencumbered object
changes = _.cloneDeep(changes);
changes = _.clone(changes);

// Enforce valid usage
var validId = _.isString(id) || _.isFinite(id);
Expand Down

0 comments on commit 2d62a0a

Please sign in to comment.