Skip to content

Commit

Permalink
fix(core): better detect hasManyThrough relation
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
JonnyBGod committed Dec 11, 2016
1 parent 2bb0e87 commit 5d6d0bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include-through.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = function(Model, options) {
if (relations) {
Object.keys(relations).forEach(function(targetModel) {
var type =
relations[targetModel].modelThrough ? 'hasManyThrough' : relations[targetModel].type;
(relations[targetModel].modelThrough || relations[targetModel].through) ?
'hasManyThrough' : relations[targetModel].type;

if (type === 'hasManyThrough') {
Model.afterRemote('prototype.__get__' + targetModel, injectIncludes);
Expand Down

0 comments on commit 5d6d0bf

Please sign in to comment.