Skip to content

Commit e4380f2

Browse files
committed
Close #133. Don't attempt to display/render non-DOMWidget (i.e., Widget) objects
1 parent 597c2b5 commit e4380f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shinywidgets/_render_widget_base.py

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ async def render(self) -> Jsonifiable | None:
8989

9090
self._widget = cast(WidgetT, widget)
9191

92+
# Don't actually display anything unless this is a DOMWidget
93+
if not isinstance(widget, DOMWidget):
94+
return None
95+
9296
return {
9397
"model_id": str(
9498
cast(

0 commit comments

Comments
 (0)