Skip to content

Commit

Permalink
Fix for root routing.
Browse files Browse the repository at this point in the history
  • Loading branch information
filipstachura committed Nov 7, 2024
1 parent ce589f7 commit 0030680
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/shiny_router/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
))
Expand All @@ -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)

Expand Down

0 comments on commit 0030680

Please sign in to comment.