Commit 7d0cb1a
committed
refactor: remove unnecessary Fragment wrapping
Children.only() already validates that the highlight result is a single
element, so wrapping it in a Fragment first just to read .props.children
back off the wrapper is a no-op. Call Children.only() on the result
directly and cast, since the highlight prop is typed as ReactNode.1 parent 89493fa commit 7d0cb1a
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
0 commit comments