Skip to content

Commit

Permalink
Fix misleading LinkTo error message
Browse files Browse the repository at this point in the history
This fixes #18640.

(cherry picked from commit e49285a)
  • Loading branch information
ef4 authored and kategengler committed Jan 19, 2021
1 parent 3298169 commit 29a5133
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/@ember/-internals/glimmer/lib/components/link-to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,11 +811,8 @@ const LinkComponent = EmberComponent.extend({
return routing.generateURL(route, models, query);
} catch (e) {
// tslint:disable-next-line:max-line-length
assert(
`You attempted to generate a link for the "${this.route}" route, but did not ` +
`pass the models required for generating its dynamic segments. ` +
e.message
);
e.message = `While generating link to route "${this.route}": ${e.message}`;
throw e;
}
} else {
return routing.generateURL(route, models, query);
Expand Down

0 comments on commit 29a5133

Please sign in to comment.