Skip to content

Commit

Permalink
fix(test-helpers): fix models normalization in linkFor (#302)
Browse files Browse the repository at this point in the history
Will need to revisit this.
  • Loading branch information
tstormk authored Mar 24, 2020
1 parent ab668f5 commit 2e19c00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addon/helpers/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ export default class LinkHelper extends Helper {
? named.models
: named.model
? [named.model]
: (positional.slice(
: positional.length > 1
? (positional.slice(
1,
positionalQueryParameters ? -1 : undefined
) as RouteModel[]),
) as RouteModel[])
: undefined,
query: named.query ?? positionalQueryParameters
};
}
Expand Down

0 comments on commit 2e19c00

Please sign in to comment.