mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
fixes incorrect toJSON extension, for eager loaded models
This commit is contained in:
parent
6c6119a5c8
commit
c83835a811
1 changed files with 2 additions and 2 deletions
|
@ -35,8 +35,8 @@ GhostBookshelf.Model = GhostBookshelf.Model.extend({
|
||||||
return attrs;
|
return attrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
_.each(relations, function (key) {
|
_.each(relations, function (relation, key) {
|
||||||
attrs[key] = relations[key].toJSON();
|
attrs[key] = relation.toJSON ? relation.toJSON() : relation;
|
||||||
});
|
});
|
||||||
|
|
||||||
return attrs;
|
return attrs;
|
||||||
|
|
Loading…
Reference in a new issue