Skip to content

Commit 5ed8704

Browse files
dedupe windowed libraries at the end (#5482)
* dedupe windowed libraries at the end * use list dict fromkeys Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 6a29fbf commit 5ed8704

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

reflex/compiler/compiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ def _compile_app(app_root: Component) -> str:
8686
(_normalize_library_name(name), name) for name in bundled_libraries
8787
]
8888

89+
window_libraries_deduped = list(dict.fromkeys(window_libraries))
90+
8991
app_root_imports = app_root._get_all_imports()
9092
_apply_common_imports(app_root_imports)
9193

9294
return templates.APP_ROOT.render(
9395
imports=utils.compile_imports(app_root_imports),
9496
custom_codes=app_root._get_all_custom_code(),
9597
hooks=app_root._get_all_hooks(),
96-
window_libraries=window_libraries,
98+
window_libraries=window_libraries_deduped,
9799
render=app_root.render(),
98100
dynamic_imports=app_root._get_all_dynamic_imports(),
99101
)

0 commit comments

Comments
 (0)