ember-redirect
ember-redirect copied to clipboard
Link-tos to generated route redirects throw error
Steps to reproduce:
- Add the following to the dummy app:
{{#link-to 'generated'}}Generated{{/link-to}}
- Run
ember s
- Click the link and observer the following error:
Uncaught TypeError: Cannot read property 'split' of undefined
which occurs in this method snippet:
function findChildRouteName(parentRoute, originatingChildRoute, name) {
var router = parentRoute.router;
var childName;
var targetChildRouteName = originatingChildRoute.routeName.split('.').pop();
I'm getting this same error, however it is provoked by hitting an arbitrary endpoint.
The issue is that originatingChildRoute.routeName is undefined. However it's hard to trace this back to the originating issue.
Removing ember-redirect and rebuilding the node modules makes the error go away, so I am assuming this is provoked by an uncaught error in ember-redirect which is being caught further up in ember.