Skip to content

Commit

Permalink
Include child imports in markdown component_map
Browse files Browse the repository at this point in the history
If a component in the markdown component_map contains children components, use
`_get_all_imports` to recursively enumerate them.

Fix #3880
  • Loading branch information
masenf committed Sep 4, 2024
1 parent 356deb5 commit 952c438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reflex/components/markdown/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def add_imports(self) -> ImportDict | list[ImportDict]:
),
},
*[
component(_MOCK_ARG)._get_imports() # type: ignore
component(_MOCK_ARG)._get_all_imports() # type: ignore
for component in self.component_map.values()
],
CodeBlock.create(theme="light")._get_imports(), # type: ignore,
Expand Down

0 comments on commit 952c438

Please sign in to comment.