Browse Source

Merge pull request #1253 from Demonthos/fix-map-route

Fix finding files with a custom map_path
Jonathan Kelley 1 year ago
parent
commit
f704d81519
1 changed files with 1 additions and 4 deletions
  1. 1 4
      packages/ssr/src/incremental.rs

+ 1 - 4
packages/ssr/src/incremental.rs

@@ -190,10 +190,7 @@ impl IncrementalRenderer {
     }
 
     fn find_file(&self, route: &str) -> Option<ValidCachedPath> {
-        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");