Fix multiple calls to createReactContextInBackground
Reviewed By: astreet Differential Revision: D2674440 fb-gh-sync-id: f842826516d2b03291ad0c4bf5c8dcbf8ec0f3a9
This commit is contained in:
parent
7da42e3950
commit
3e7db56445
|
@ -438,12 +438,8 @@ public class ReactInstanceManager {
|
|||
|
||||
// If react context is being created in the background, JS application will be started
|
||||
// automatically when creation completes, as root view is part of the attached root view list.
|
||||
if (!mIsContextInitAsyncTaskRunning) {
|
||||
if (mCurrentReactContext == null) {
|
||||
createReactContextInBackground();
|
||||
} else {
|
||||
attachMeasuredRootViewToInstance(rootView, mCurrentReactContext.getCatalystInstance());
|
||||
}
|
||||
if (!mIsContextInitAsyncTaskRunning && mCurrentReactContext != null) {
|
||||
attachMeasuredRootViewToInstance(rootView, mCurrentReactContext.getCatalystInstance());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue