Skip to content

Commit fbcae95

Browse files
authored
skip duplicate DynamicRouteVar (#6202)
1 parent 7ee3026 commit fbcae95

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

reflex/state.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,15 @@ def setup_dynamic_args(cls, args: dict[str, str]):
12951295
Args:
12961296
args: a dict of args
12971297
"""
1298+
# Skip dynamic args that have already been registered by a previous route.
1299+
args = {
1300+
k: v
1301+
for k, v in args.items()
1302+
if not (
1303+
(computed_var := cls.computed_vars.get(k)) is not None
1304+
and isinstance(computed_var, DynamicRouteVar)
1305+
)
1306+
}
12981307
if not args:
12991308
return
13001309

0 commit comments

Comments
 (0)