Skip to content

Commit 2638787

Browse files
committed
Actual fix for 5cd9078
1 parent ae8462e commit 2638787

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

emmett_core/routing/router.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def _split_lang(router, path):
108108
clean_path = path.lstrip("/")
109109
next_sep = clean_path[2:3]
110110
if not next_sep or next_sep == "/":
111-
lang, new_path = clean_path[:2], clean_path[2:]
111+
lang, new_path = clean_path[:2], (clean_path[2:] or "/")
112112
if lang != default and lang in router.app._languages_set:
113-
return "/" + new_path, lang
113+
return new_path, lang
114114
return path, default
115115

116116
@classmethod

0 commit comments

Comments
 (0)