From ad450b8648ddcf9403d0d00d843cb96f9b9d38de Mon Sep 17 00:00:00 2001 From: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Sat, 11 May 2024 15:39:25 +1200 Subject: [PATCH] chore: stop eslint from freaking out --- packages/react-router/src/router.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-router/src/router.ts b/packages/react-router/src/router.ts index bea0ca556..de1bded9e 100644 --- a/packages/react-router/src/router.ts +++ b/packages/react-router/src/router.ts @@ -493,8 +493,7 @@ export class Router< scores: Array }> = [] - // eslint-disable-next-line - const routes = Object.values(this.routesById) as Array + const routes: Array = Object.values(this.routesById) routes.forEach((d, i) => { if (d.isRoot || !d.path) { @@ -936,9 +935,10 @@ export class Router< fromMatches.find((e) => e.routeId === d.routeId), ) - const fromRouteByFromPathRouteId = ( - this.routesById as RoutesById - )[stayingMatches?.find((d) => d.pathname === fromPath)?.routeId] + const fromRouteByFromPathRouteId = + this.routesById[ + stayingMatches?.find((d) => d.pathname === fromPath)?.routeId + ] let pathname = dest.to ? this.resolvePathWithBase(fromPath, `${dest.to}`)