Commit 194711a
authored
fix: collect imports from components in props in _get_all_imports() (#6317)
Fixes #6312
_get_all_imports() only walked self.children to collect transitive
imports. Components embedded in props (e.g. a fallback: Component prop)
were skipped, causing missing JS imports and ReferenceError at runtime.
The sibling methods _get_all_custom_code() and _get_all_dynamic_imports()
already call self._get_components_in_props() for this case. This brings
_get_all_imports() in line with them.
Co-authored-by: lawrence3699 <lawrence3699@users.noreply.github.com>1 parent c979b46 commit 194711a
2 files changed
Lines changed: 32 additions & 1 deletion
File tree
- packages/reflex-base/src/reflex_base/components
- tests/units/components
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1750 | 1750 | | |
1751 | 1751 | | |
1752 | 1752 | | |
1753 | | - | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1754 | 1759 | | |
1755 | 1760 | | |
1756 | 1761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
525 | 551 | | |
526 | 552 | | |
527 | 553 | | |
| |||
0 commit comments