Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iOS): look through whole ancestor chain when looking for screenvi…
…ew from content wrapper (#2683) ## Description In #2670 I've added a check that logged RN error in case `contentWrapper.reactSuperview` is not a `RNSScreenView`. Now I got reports (but no reproduction :/) from two independent sources that this error is triggered pretty often, which is unexpected from my perspective. I blindly blame view flattening / usage of legacy navigators but can not be sure. This PR is an attempt to patch this behaviour. ## Changes contentWrapper now searches whole view ancestor chain before logging an error. ## Test code and steps to reproduce No reproducer :/ ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: <!-- For adding new props to native-stack --> - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes
- Loading branch information