Skip to content

Commit

Permalink
fix(core): Updated the Regular Expression for more generic Relation n…
Browse files Browse the repository at this point in the history
…ames

Update include-through.js
  • Loading branch information
JonnyBGod authored Apr 15, 2018
2 parents 3ff8ba3 + 9d28d80 commit f4ec07e
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 @@ -31,7 +31,7 @@ module.exports = function(Model, options) {
function controller(ctx, unused, next) {
if (ctx.methodString.indexOf('prototype.__get__') !== -1) {
// the original version
var relationName = ctx.methodString.match(/__([a-z\d]+)$/)[1];
var relationName = ctx.methodString.match(/__([a-zA-Z]+)$/)[1];
var partialResult = JSON.parse(JSON.stringify(ctx.result));
injectIncludes(ctx, partialResult, relationName).then(function(partialResult) {
ctx.result = partialResult;
Expand Down

0 comments on commit f4ec07e

Please sign in to comment.