Skip to content

Commit

Permalink
chore(get_current_session): Return default session if current is expl…
Browse files Browse the repository at this point in the history
…icitly None (#1086)
  • Loading branch information
gadenbuie authored Mar 19, 2024
1 parent 2ef41dd commit 02d3f62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shiny/session/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def get_current_session() -> Optional[Session]:
--------
* :func:`~shiny.session.require_active_session`
"""
return _current_session.get() or _default_session
session = _current_session.get()
return session if session is not None else _default_session


@contextmanager
Expand Down

0 comments on commit 02d3f62

Please sign in to comment.