I'm getting the error TypeError: Cannot read property 'name' of undefined when trying to this.transitionTo({ queryParams: { somParam: 'someValue' } }) in this very line:
|
let leafRouteName = routeInfos[handlerInfoLength - 1].name; |
I debugged it and it appears that routeInfos is an empty array and therefore that line must throw naturally. As I am unable to reproduce it in a twiddle and have no clue how to debug this further, I'd like to know what an empty routeInfos array actually means here and if this is an error after all or rather a bug? When looking at my app, it works as expected, i.e. the query parameter does get set and the URL in the browser is updated accordingly. So this is not an issue about the query parameter not being set.
For the matter of this issue, I'd say a check if that array is empty and a better error message should be added. I can't PR this as I don't understand the internals here, otherwise I would.
I'm getting the error
TypeError: Cannot read property 'name' of undefinedwhen trying tothis.transitionTo({ queryParams: { somParam: 'someValue' } })in this very line:ember.js/packages/@ember/-internals/routing/lib/system/router.ts
Line 1083 in bef8602
I debugged it and it appears that
routeInfosis an empty array and therefore that line must throw naturally. As I am unable to reproduce it in a twiddle and have no clue how to debug this further, I'd like to know what an emptyrouteInfosarray actually means here and if this is an error after all or rather a bug? When looking at my app, it works as expected, i.e. the query parameter does get set and the URL in the browser is updated accordingly. So this is not an issue about the query parameter not being set.For the matter of this issue, I'd say a check if that array is empty and a better error message should be added. I can't PR this as I don't understand the internals here, otherwise I would.