Allow precreated JSC executor init without applicationScript

Reviewed By: mmmulani

Differential Revision: D3836643

fbshipit-source-id: 18937ef5b39ebe3b3fd743490f86e40ffa6ee015
This commit is contained in:
Pieter De Baets 2016-09-13 06:43:04 -07:00 committed by Facebook Github Bot 3
parent e2cf37a5a6
commit d6926c5468
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ static NSThread *newJavaScriptThread(void)
*JSContext = data.context;
}
RCTJSCExecutor *executor = [[RCTJSCExecutor alloc] initWithJSContextData:data];
if (![executor _synchronouslyExecuteApplicationScript:applicationScript sourceURL:sourceURL JSContext:data.context error:error]) {
if (applicationScript && ![executor _synchronouslyExecuteApplicationScript:applicationScript sourceURL:sourceURL JSContext:data.context error:error]) {
return nil; // error has been set by _synchronouslyExecuteApplicationScript:
}
return executor;