Skip to content

Commit

Permalink
[fix dist] use proper clone because of the meta object reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrugzz committed Aug 29, 2014
1 parent 41a4b9d commit 14cf31c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
19 changes: 3 additions & 16 deletions lib/godot/common/index.js
Expand Up @@ -5,27 +5,14 @@
*
*/

var clone = require('clone');

//
// ### function clone (data)
// Returns a copy of the data event.
//
exports.clone = function (data) {
return Object.keys(data).reduce(function (obj, key) {
if (key === 'tags') {
obj[key] = data[key].slice()
}
else if (key === 'meta') {
//
// TODO: Fast close meta
//
obj[key] = data[key];
}
else {
obj[key] = data[key];
}

return obj;
}, {});
return clone(data, false);
};

//
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -19,6 +19,7 @@
},
"dependencies": {
"back": "0.1.x",
"clone": "~0.1.18",
"graphite": "0.0.6",
"ip": "0.0.x",
"json-stream": "0.2.x",
Expand Down

0 comments on commit 14cf31c

Please sign in to comment.