Skip to content

Commit 35a1262

Browse files
committed
WIP: BUG: Support getter's in JupyterLite, Hypha
Discussed in InsightSoftwareConsortium#730. The result needs to be awaited.
1 parent 3e3b0c1 commit 35a1262

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/jupyterlite/files/Hello3DWorld.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"outputs": [],
99
"source": [
1010
"import piplite\n",
11-
"await piplite.install('itkwidgets==1.0a24')"
11+
"await piplite.install('itkwidgets==1.0a46.dev18+g0bcf158.d20240111')"
1212
]
1313
},
1414
{

itkwidgets/viewer.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ def fetch_value(func: Callable) -> Callable:
319319
@functools.wraps(func)
320320
def _fetch_value(self, *args, **kwargs):
321321
result = func(self, *args, **kwargs)
322-
if isawaitable(result):
322+
global _cell_watcher
323+
if isawaitable(result) and _cell_watcher:
323324
future = asyncio.ensure_future(result)
324325
self.call_getter(future)
325326
return future

0 commit comments

Comments
 (0)