Skip to content

Commit

Permalink
chore: reuse array'd routeMap
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <logan@mcan.sh>
  • Loading branch information
mcansh committed Jan 30, 2023
1 parent 9c1ce8d commit 06e0367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remix-dev/config/flat-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function flatRoutesUniversal(
};

if (index) {
let invalidChildRoutes = Object.values(routeMap).filter(
let invalidChildRoutes = routes.filter(
(routeInfo) => routeInfo.parentId === childRoute.id
);

Expand Down Expand Up @@ -348,7 +348,7 @@ function getRouteMap(
appDirectory: string,
routePaths: string[],
prefix: string
) {
): Readonly<Map<string, RouteInfo>> {
let routeMap = new Map<string, RouteInfo>();
let nameMap = new Map<string, RouteInfo>();

Expand Down

0 comments on commit 06e0367

Please sign in to comment.