Skip to content

Commit

Permalink
Add additional guard in state._is_launching
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 9, 2024
1 parent 76c911a commit 0da615e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panel/io/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def _current_thread(self) -> str | None:
@property
def _is_launching(self) -> bool:
curdoc = self.curdoc
if not curdoc or not curdoc.session_context:
if not curdoc or not curdoc.session_context or not curdoc.session_context.server_context:
return False
return not bool(curdoc.session_context.server_context.sessions)

Expand Down

0 comments on commit 0da615e

Please sign in to comment.