From daa1f0cb52c0f586dfd786b9d1304b314777b22c Mon Sep 17 00:00:00 2001 From: Lendemor Date: Thu, 12 Dec 2024 15:14:11 +0100 Subject: [PATCH] something broke during the merge I guess --- reflex/components/component.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 0a4851fc8b..b22b3ac6f7 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -2210,21 +2210,17 @@ def _get_deps_from_event_trigger(event: EventChain | EventSpec | Var) -> set[str """ events: list = [event] deps = set() + if isinstance(event, EventChain): events.extend(event.events) for ev in events: if isinstance(ev, EventSpec): for arg in ev.args: - deps.union( - { - str(dep) - for a in arg - if a._var_data is not None - for dep in a._var_data.deps - if a._var_data.deps is not None - } - ) + for a in arg: + var_datas = VarData.merge(a._get_all_var_data()) + if var_datas and var_datas.deps is not None: + deps |= {str(dep) for dep in var_datas.deps} return deps @classmethod