Fixing RN Debugger
Reviewed By: cwdick, javache Differential Revision: D4409257 fbshipit-source-id: 062c798d1a1c9ad90884599ed262412c1dd51359
This commit is contained in:
parent
545072b02d
commit
154e183344
|
@ -73,10 +73,16 @@ void Instance::loadScriptFromFile(const std::string& filename,
|
|||
"fileName", filename);
|
||||
|
||||
std::unique_ptr<const JSBigFileString> script;
|
||||
|
||||
// This function can be called in order to change the Bridge's Source URL.
|
||||
// In that case, the filename will be empty, and we should not attempt to
|
||||
// load it.
|
||||
if (!filename.empty()) {
|
||||
RecoverableError::runRethrowingAsRecoverable<std::system_error>(
|
||||
[&filename, &script]() {
|
||||
script = JSBigFileString::fromPath(filename);
|
||||
});
|
||||
}
|
||||
|
||||
nativeToJsBridge_->loadApplication(nullptr, std::move(script), sourceURL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue