Commit ed9bc5e
committed
Prevent widget constructors from being marked as functional components
A widget factory generated via asFactory() may be passed a "parent"
factory as the second parameter to make it work as a selector. If the
given function was not actually a factory but a widget constructor
this would override the existing functionality of that constructor
as a selector, resulting in very confusing behavior.
Check that the parent factory is not a constructor for an object
that can be used as a JSX Element (and therefore as a selector).
Fix #2137
Change-Id: Ib0de0131436583f138adf8564914e30221771b181 parent 43ff821 commit ed9bc5e
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
217 | 225 | | |
218 | | - | |
| 226 | + | |
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
809 | 813 | | |
810 | 814 | | |
811 | 815 | | |
| |||
0 commit comments