Skip to content

Commit df8ff12

Browse files
committed
fix(MarkdownStream): correctly set the latest stream when it gets invoked
1 parent 9ff95ef commit df8ff12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shiny/ui/_markdown_stream.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ async def _task():
158158

159159
_task()
160160

161+
self._latest_stream.set(_task)
162+
161163
# Since the task runs in the background (outside/beyond the current context,
162164
# if any), we need to manually raise any exceptions that occur
163165
@reactive.effect
@@ -208,7 +210,7 @@ def get_latest_stream_result(self) -> Union[str, None]:
208210
"The `.get_latest_stream_result()` method is deprecated and will be removed "
209211
"in a future release. Use `.latest_stream.result()` instead. "
210212
)
211-
self.latest_stream.result()
213+
return self.latest_stream.result()
212214

213215
async def clear(self):
214216
"""

0 commit comments

Comments
 (0)