SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

fix array type parsing in DynamicEventPayload::extractValue (#53689)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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: ed25c8917b90190c995d1fcd6d60af207e72e270
Z
Zeya Peng committed
cf5040b4f82934c075a72b35d5f2d1d0dfa7aac1
Parent: 019a553
Committed by Facebook GitHub Bot <[email protected]> on 9/10/2025, 4:12:26 AM