Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "Illegal type provided" crash (#2853)
## Description Sometimes RN passes ReadableMap/Array instead of WritableMap/Array when updateProps is called. Currently adding a ReadableMap/Array to a WritableMap/Array is not supported (I opened a PR to allow it since there's no reason it can't be allowed facebook/react-native#32910). In the meantime we have to check if it's not Writable and copy before adding it. Fixes #2722 ## Changes ## Screenshots / GIFs N/A ## Test code and steps to reproduce I'm not sure exactly what the minimum repro is, I could 100% repro the crash in an app, but wasn't able to isolate. The app makes heavy usage of a bottom sheet lib that uses reanimated. I was able to repro a few times in the example app with the repro in the linked issue, but not consistently. In the app where I could repro consistently I verified that it no longer crashes after this change. ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Added TS types tests - [ ] Added unit / integration tests - [ ] Updated documentation - [ ] Ensured that CI passes
- Loading branch information