We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6a0fa8 commit cdef12fCopy full SHA for cdef12f
shiny/reactive/_core.py
@@ -81,8 +81,12 @@ def __init__(self) -> None:
81
82
def register(self) -> None:
83
ctx: Context = get_current_context()
84
- if ctx.id not in self._dependents:
85
- self._dependents[ctx.id] = ctx
+
+ if ctx.id in self._dependents:
86
+ # This context is already registered; no need to register it.
87
+ return
88
89
+ self._dependents[ctx.id] = ctx
90
91
def on_invalidate_cb() -> None:
92
if ctx.id in self._dependents:
0 commit comments