Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1296,14 +1296,12 @@ private void detachRootViewFromInstance(ReactRoot reactRoot, ReactContext reactC
uiManager.stopSurface(surfaceId);
} else {
FLog.w(ReactConstants.TAG, "Failed to stop surface, UIManager has already gone away");
reactRoot.getRootViewGroup().removeAllViews();
}
} else {
ReactSoftExceptionLogger.logSoftException(
TAG,
new RuntimeException(
"detachRootViewFromInstance called with ReactRootView with invalid id"));
reactRoot.getRootViewGroup().removeAllViews();
}
} else {
reactContext
Expand All @@ -1312,8 +1310,7 @@ private void detachRootViewFromInstance(ReactRoot reactRoot, ReactContext reactC
.unmountApplicationComponentAtRootTag(reactRoot.getRootViewTag());
}

// The view is no longer attached, so mark it as such by resetting its ID.
reactRoot.getRootViewGroup().setId(View.NO_ID);
clearReactRoot(reactRoot);
}

@ThreadConfined(UI)
Expand Down