Skip to content

Commit d605c2b

Browse files
authored
Fix error setting up ESM autoreload watcher (#8361)
1 parent 7e67d23 commit d605c2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

panel/custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class CounterButton(pn.custom.ReactiveESM):
259259

260260
def __init__(self, **params):
261261
super().__init__(**params)
262-
self._watching_esm = False
262+
self._watching_esm = None
263263
self._event__callbacks = defaultdict(list)
264264
self._msg__callbacks = []
265265

@@ -410,7 +410,7 @@ def _cleanup(self, root: Model | None = None) -> None:
410410
self._watching_esm.set()
411411
if self._watching_esm in state._watch_events:
412412
state._watch_events.remove(self._watching_esm)
413-
self._watching_esm = False
413+
self._watching_esm = None
414414

415415
async def _watch_esm(self):
416416
import watchfiles

0 commit comments

Comments
 (0)