From 003068039be3b8eae10dfd66113e157c305100e9 Mon Sep 17 00:00:00 2001 From: Filip Stachura Date: Thu, 7 Nov 2024 11:51:35 +0100 Subject: [PATCH] Fix for root routing. --- src/shiny_router/router.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/shiny_router/router.py b/src/shiny_router/router.py index 3987b92..2e7ee4b 100644 --- a/src/shiny_router/router.py +++ b/src/shiny_router/router.py @@ -43,7 +43,7 @@ def _(): clean_path = requested_path[3:] if requested_path.startswith("#!/") else requested_path # TODO: Below simplifies and is incorrect: input.shiny_router_page.set(dict( - path = clean_path, + path = clean_path if clean_path else root, query = None, unparsed = requested_path, )) @@ -52,8 +52,6 @@ def _(): @reactive.event(input.shiny_router_page) async def _(): page_path = input.shiny_router_page() - print("shiny router page changed") - print(page_path) log_msg("shiny.router main output. path: ", page_path["path"]) await session.send_custom_message("switch-ui", page_path)