Permalink
Browse files

faster toJSON function

  • Loading branch information...
adrai committed May 24, 2013
1 parent c036524 commit 24f85b72086f74e044dee0593381649d34d4b8a2
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/bases/aggregateBase.js
@@ -25,9 +25,10 @@ Aggregate.prototype = {
},
toJSON: function() {
- var parse = JSON.deserialize || JSON.parse;
- var json = parse(JSON.stringify(this.attributes));
- return json;
+ // var parse = JSON.deserialize || JSON.parse;
+ // var json = parse(JSON.stringify(this.attributes));
+ // return json;
+ return _.clone(this.attributes);
},
toEvent: function(name, data) {

0 comments on commit 24f85b7

Please sign in to comment.