Hotfix for the case when views are invalidated but not removed from subviews

The above situation may happen when grandparent is unmounted from react. In such a case children are not removed from non direct ancestors but still get invalidated.
This commit is contained in:
Krzysztof Magiera
2020-02-24 23:29:58 +01:00
parent 4e72ad050b
commit b52aea3fd2

View File

@@ -367,7 +367,7 @@
NSMutableArray<UIViewController *> *pushControllers = [NSMutableArray new];
NSMutableArray<UIViewController *> *modalControllers = [NSMutableArray new];
for (RNSScreenView *screen in _reactSubviews) {
if (![_dismissedScreens containsObject:screen]) {
if (![_dismissedScreens containsObject:screen] && screen.controller != nil) {
if (pushControllers.count == 0) {
// first screen on the list needs to be places as "push controller"
[pushControllers addObject:screen.controller];