Commit 514a6cd
Guard against unmounted components when using traversal APIs (facebook#41451)
Summary:
After [this change in React](facebook/react#27687), `ReactFabric.getPublicInstanceFromInternalInstanceHandle` can return `null` if the instance handle is a fiber that was unmounted (before that PR, it would throw an error).
This modifies the DOM traversal API to gracefully handle that case.
Changelog: [internal]
Reviewed By: rshest
Differential Revision: D512104551 parent 5b3a4bd commit 514a6cd
File tree
2 files changed
+10
-6
lines changed- packages/react-native/Libraries/DOM/Nodes
2 files changed
+10
-6
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
325 | | - | |
326 | | - | |
327 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
| |||
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
351 | | - | |
| 355 | + | |
352 | 356 | | |
353 | 357 | | |
354 | 358 | | |
| |||
0 commit comments