Skip to content

Commit

Permalink
fix(broken transition): there's a chance that at times a transition w…
Browse files Browse the repository at this point in the history
…ill not have a 'to', so handling that case
  • Loading branch information
webark committed Jun 11, 2019
1 parent 1db847f commit 756e89e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/instance-initializers/route-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function initialize(appInstance) {
});

router.on('routeWillChange', function(transition) {
if (/_loading$/.test(transition.to.name) && transition.isActive) {
if (transition.to && /_loading$/.test(transition.to.name) && transition.isActive) {
const routeNames = nestedRouteNames(transition.to)
// loading route names are set with an _loading even though
// their path is -loading
Expand Down

0 comments on commit 756e89e

Please sign in to comment.