Skip to content

Commit 756e89e

Browse files
committed
fix(broken transition): there's a chance that at times a transition will not have a 'to', so handling that case
1 parent 1db847f commit 756e89e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/instance-initializers/route-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function initialize(appInstance) {
88
});
99

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

0 commit comments

Comments
 (0)