Commit 42cbca0
committed
fix(react): guard against undefined 48357typeof in check()
The check() function assumes Component['48357typeof'] is always defined
when typeof Component === 'object', but non-React component objects
(e.g. Svelte components imported via barrel) may not have 48357typeof.
Calling .toString() on undefined throws TypeError.
Add a null guard so the check returns false for non-React components
instead of crashing.1 parent 4806275 commit 42cbca0
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments