Commit da668bf
committed
Skip dropped mapped node in PropsAnimatedNode.updateView instead of crashing
A mapped child node can be removed from NativeAnimatedNodesManager (e.g.
its component unmounted during a navigation transition) between animation
frames while the prop node is still queued for an update. updateView()
then calls requireNotNull on the missing node and throws
IllegalArgumentException: "Mapped property node does not exist", crashing
the app on a benign teardown race. Skip the stale node instead, mirroring
the connectedViewTag == -1 early-return at the top of the method.
Fixes #37267.1 parent 27e83d0 commit da668bf
1 file changed
Lines changed: 9 additions & 1 deletion
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
0 commit comments