From f69087d919a0628aa88b257208dd3916ae564ea1 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Mon, 22 Jul 2024 12:02:21 +0200 Subject: [PATCH] chore(prerender types): Remove `any` type (#11046) --- packages/prerender/src/runPrerender.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/prerender/src/runPrerender.tsx b/packages/prerender/src/runPrerender.tsx index eade48aa5e8d..dc6767e94536 100644 --- a/packages/prerender/src/runPrerender.tsx +++ b/packages/prerender/src/runPrerender.tsx @@ -157,7 +157,11 @@ function insertChunkLoadingScript( ) { const prerenderRoutes = detectPrerenderRoutes() - const route = prerenderRoutes.find((route: any) => { + const route = prerenderRoutes.find((route) => { + if (!route.routePath) { + return false + } + return matchPath(route.routePath, renderPath).match })