Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't update view tag when null (#6353)
## Summary `setLocalRef` may be called with `null` being passed as the argument. This is handled by the conditional in the logic related to layout animations but not when updating the component view tag. There may be cases where component view tag will become null and will be passed to [`removePropsFromRegistry`](https://github.com/software-mansion/react-native-reanimated/blob/158602bd4137ae70aceaaf43e3f2b75b47da04a5/packages/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx#L253), which will then crash on the native side as it assumes it will receive an array of numbers. Assuming this is the correct way to handle this (is it possible that assigning null to view tag is expected here?), then the code may be changed slightly not to repeat the same check and do an early return. Let me know if you prefer that. ## Test plan Just trust me (I don't have any other reproduction than the Expensify App on the 0.74 upgrade branch (with strict mode enabled, without it everything works) 😞)
- Loading branch information