mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-13 10:55:58 +03:00
fixes incorrect toJSON extension, for eager loaded models
This commit is contained in:
parent
6c6119a5c8
commit
c83835a811
@ -35,8 +35,8 @@ GhostBookshelf.Model = GhostBookshelf.Model.extend({
|
||||
return attrs;
|
||||
}
|
||||
|
||||
_.each(relations, function (key) {
|
||||
attrs[key] = relations[key].toJSON();
|
||||
_.each(relations, function (relation, key) {
|
||||
attrs[key] = relation.toJSON ? relation.toJSON() : relation;
|
||||
});
|
||||
|
||||
return attrs;
|
||||
|
Loading…
Reference in New Issue
Block a user