ember-redirect icon indicating copy to clipboard operation
ember-redirect copied to clipboard

Link-tos to generated route redirects throw error

Open elwayman02 opened this issue 9 years ago • 1 comments

Steps to reproduce:

  1. Add the following to the dummy app: {{#link-to 'generated'}}Generated{{/link-to}}
  2. Run ember s
  3. 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();

elwayman02 avatar Sep 30 '15 00:09 elwayman02

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.

aaroncraigongithub avatar Aug 25 '16 23:08 aaroncraigongithub