From a267201e245a2d8b6f626fd0f090248e4de7d762 Mon Sep 17 00:00:00 2001 From: Dmytro Krekota Date: Thu, 18 Feb 2021 12:34:52 +0200 Subject: [PATCH] Fix undefined route info --- packages/@ember/-internals/routing/lib/system/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ember/-internals/routing/lib/system/router.ts b/packages/@ember/-internals/routing/lib/system/router.ts index 1fa016d866a..fbda42a0930 100644 --- a/packages/@ember/-internals/routing/lib/system/router.ts +++ b/packages/@ember/-internals/routing/lib/system/router.ts @@ -947,7 +947,7 @@ class EmberRouter extends EmberObject { */ _queryParamsFor(routeInfos: PrivateRouteInfo[]) { let routeInfoLength = routeInfos.length; - let leafRouteName = routeInfos[routeInfoLength - 1].name; + let leafRouteName = routeInfos[routeInfoLength - 1]?.name; let cached = this._qpCache[leafRouteName]; if (cached !== undefined) { return cached;