Commit c8e5088
committed
Slot: Fix React Element type check for lazy components
Co-authored-by: Jenna Smith <jjenzz@users.noreply.github.com>
The `React.isValidElement(element)` check in `isLazyComponent` returned `false`
for lazy elements in a NextJS prod build (unclear yet if this is just a Next
thing or an issue with the prod build of React). Changing the check to
`'$$typeof' in element` fixes it.1 parent e98cb92 commit c8e5088
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
0 commit comments