Commit cf5040b
fix array type parsing in DynamicEventPayload::extractValue (#53689)
Summary:
Pull Request resolved: #53689
## Changelog:
[General] [Fixed] - fix array type parsing in DynamicEventPayload::extractValue
When unwrapping event mapping like `e.nativeEvent.touches[0].locationX` e.g. for Animated.event like below,
```
onTouchMove={Animated.event(
[
{
nativeEvent: {
touches: {
0: {locationX: animatedValue},
},
},
},
],
{useNativeDriver: true},
)}
```
here it'll throw exception `terminating due to uncaught exception of type folly::TypeError: TypeError: expected dynamic type 'object', but had type 'array'` when getting into folly dynamic array, because array index in the event path is string instead of integer
Reviewed By: rozele
Differential Revision: D82050538
fbshipit-source-id: ed25c8917b90190c995d1fcd6d60af207e72e2701 parent 019a553 commit cf5040b
1 file changed
Lines changed: 3 additions & 3 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
33 | 31 | | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments