Commit 833a86a4 authored by Sebastian's avatar Sebastian
Browse files

code style changes

parent 1a85edc2
......@@ -106,7 +106,9 @@ module.exports.toJSON = function(object, attributes, options) {
return;
}
var value = object[attribute]();
var value = object[attribute](),
newObj;
if(options.hooks[attribute]) {
value = options.hooks[attribute](value);
}
......@@ -117,7 +119,7 @@ module.exports.toJSON = function(object, attributes, options) {
result[attribute] = value;
if(Array.isArray(result[attribute])) {
var newObj = [];
newObj = [];
result[attribute].forEach(function(object) {
newObj.push(object.toJSON());
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment