File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,9 @@ def _unmount_model_states(self, old_states: List[_ModelState]) -> None:
404404 while to_unmount :
405405 model_state = to_unmount .pop ()
406406
407+ for target in model_state .targets_by_event .values ():
408+ del self ._event_handlers [target ]
409+
407410 if hasattr (model_state , "life_cycle_state" ):
408411 life_cycle_state = model_state .life_cycle_state
409412 del self ._model_states_by_life_cycle_state_id [life_cycle_state .id ]
@@ -583,7 +586,7 @@ def __init__(
583586 self .targets_by_event = targets_by_event
584587 """The element's event handler target strings indexed by their event name"""
585588
586- # === Conditionally Evailable Attributes ===
589+ # === Conditionally Available Attributes ===
587590 # It's easier to conditionally assign than to force a null check on every usage
588591
589592 if parent is not None :
You can’t perform that action at this time.
0 commit comments