Commit 1229123
committed
Tighten up the types of getFirstHydratableChild
We currently call getFirstHydratableChild to step into the children of
a suspense boundary. This can be a text node or a suspense boundary
which isn't compatible with getFirstHydratableChild, and we cheat the type.
This accidentally works because .firstChild always returns null on those
nodes in the DOM.
This just makes that explicit.1 parent a5062b1 commit 1229123
File tree
2 files changed
+22
-12
lines changed- packages/react-reconciler/src
2 files changed
+22
-12
lines changedLines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
270 | 272 | | |
271 | 273 | | |
272 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
| |||
322 | 331 | | |
323 | 332 | | |
324 | 333 | | |
| 334 | + | |
325 | 335 | | |
326 | 336 | | |
327 | 337 | | |
| |||
333 | 343 | | |
334 | 344 | | |
335 | 345 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 346 | + | |
340 | 347 | | |
341 | | - | |
342 | | - | |
343 | 348 | | |
344 | 349 | | |
345 | 350 | | |
| |||
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
270 | 272 | | |
271 | 273 | | |
272 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
| |||
322 | 331 | | |
323 | 332 | | |
324 | 333 | | |
| 334 | + | |
325 | 335 | | |
326 | 336 | | |
327 | 337 | | |
| |||
333 | 343 | | |
334 | 344 | | |
335 | 345 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 346 | + | |
340 | 347 | | |
341 | | - | |
342 | | - | |
343 | 348 | | |
344 | 349 | | |
345 | 350 | | |
| |||
0 commit comments