File tree 1 file changed +2
-10
lines changed
packages/perseus/src/server
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -376,11 +376,7 @@ pub async fn get_page_for_template<M: MutableStore, T: TranslationsManager>(
376
376
. get_translator_for_locale ( locale. to_string ( ) )
377
377
. await ?;
378
378
379
- let mut path = raw_path;
380
- // If the path is empty, we're looking for the special `index` page
381
- if path. is_empty ( ) {
382
- path = "index" ;
383
- }
379
+ let path = raw_path;
384
380
// Remove `/` from the path by encoding it as a URL (that's what we store) and
385
381
// add the locale
386
382
let path_encoded = format ! ( "{}-{}" , locale, urlencoding:: encode( path) ) ;
@@ -679,11 +675,7 @@ pub async fn get_page<M: MutableStore, T: TranslationsManager>(
679
675
templates : & TemplateMap < SsrNode > ,
680
676
render_html : bool ,
681
677
) -> Result < PageData , ServerError > {
682
- let mut path = props. raw_path ;
683
- // If the path is empty, we're looking for the special `index` page
684
- if path. is_empty ( ) {
685
- path = "index" ;
686
- }
678
+ let path = props. raw_path ;
687
679
// Get the template to use
688
680
let template = templates. get ( template_name) ;
689
681
let template = match template {
You can’t perform that action at this time.
0 commit comments