Skip to content

Commit

Permalink
fix(core): use idName to get an item id value
Browse files Browse the repository at this point in the history
Fix use idName to get an item id value
  • Loading branch information
JonnyBGod authored Apr 25, 2017
2 parents 685ea87 + 22c51c5 commit 450cb2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include-through.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = function(Model, options) {

var query = {where: {}};
query.where[relationKey] = ctx.instance.id;
query.where[throughKey] = {inq: newResult.map(function(item) { return item.id; })};
query.where[throughKey] = {inq: newResult.map(function(item) { return item[idName]; })};

if (
ctx.args.filter &&
Expand Down

0 comments on commit 450cb2a

Please sign in to comment.