Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: singletonMap for module events (#42354)
Summary: Sometimes the events map can be a of type `SingletonMap` which will cause this code to throw exception when adding keys to it, so we change it to normal `HashMap`. Creating `SingletonMap` can especially happen in Kotlin when there is only one event added to a map, see: https://github.com/plaid/react-native-plaid-link-sdk/blob/5ffab5eef576163528f0da504181162da3bef08b/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt#L21 ## Changelog: [ANDROID] [FIXED] - Cover SingletonMap when parsing events exported by module Pull Request resolved: #42354 Test Plan: Create `getExportedCustomBubblingEventTypeConstants` as `SingletonMap` in some example module and see that the code does not throw. Reviewed By: cipolleschi Differential Revision: D58417266 Pulled By: cortinico fbshipit-source-id: 6c46398ddf4d044386a36d0c1663bd071d642fb6
- Loading branch information