fix(lobby): normalize host SPA deeplink path segments
All checks were successful
CI / test-and-quality (push) Successful in 2m7s
CI / test-and-quality (pull_request) Successful in 2m6s

This commit is contained in:
2026-03-01 11:25:54 +00:00
parent 84438b2880
commit 2f142aeb24
2 changed files with 14 additions and 1 deletions

View File

@@ -22,7 +22,9 @@ def host_screen(request, spa_path=None):
if settings.WPP_SPA_ENABLED:
host_route = "/host"
if spa_path:
host_route = f"/host/{spa_path.strip('/')}"
normalized_spa_path = "/".join(segment for segment in spa_path.split("/") if segment)
if normalized_spa_path:
host_route = f"/host/{normalized_spa_path}"
return _render_spa_shell(request, host_route, "host")
categories = Category.objects.filter(is_active=True).order_by("name")