From 756e89e7b1d84ab47174aac34dbfb29729ebd1ac Mon Sep 17 00:00:00 2001 From: Mark David Avery Date: Tue, 11 Jun 2019 09:53:41 -0700 Subject: [PATCH] fix(broken transition): there's a chance that at times a transition will not have a 'to', so handling that case --- addon/instance-initializers/route-styles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/instance-initializers/route-styles.js b/addon/instance-initializers/route-styles.js index 2c86cbf..0360133 100644 --- a/addon/instance-initializers/route-styles.js +++ b/addon/instance-initializers/route-styles.js @@ -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