From 715289c3de7baa498f4a9f8ada9d0e1fe1637f90 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Wed, 26 Jul 2023 11:16:31 -0700 Subject: [PATCH] fix finding files with a custom map_path --- packages/ssr/src/incremental.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ssr/src/incremental.rs b/packages/ssr/src/incremental.rs index fcecaacc5..9647124de 100644 --- a/packages/ssr/src/incremental.rs +++ b/packages/ssr/src/incremental.rs @@ -190,10 +190,7 @@ impl IncrementalRenderer { } fn find_file(&self, route: &str) -> Option { - let mut file_path = self.static_dir.clone(); - for segment in route.split('/') { - file_path.push(segment); - } + let mut file_path = (self.map_path)(route); if let Some(deadline) = self.invalidate_after { // find the first file that matches the route and is a html file file_path.push("index");