mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-13 22:29:45 +08:00
Add 'file://' prefix to sourceURL when loading a script from a file.
Reviewed By: svcscm Differential Revision: D2922108 Pulled By: androidtrunkagent fb-gh-sync-id: d9c98af31e844e3fed2f57a3a4250a6ef5e735a8 shipit-source-id: d9c98af31e844e3fed2f57a3a4250a6ef5e735a8
This commit is contained in:
committed by
facebook-github-bot-7
parent
d96a4ba94d
commit
f2a60a202f
@@ -31,7 +31,7 @@ public abstract class JSBundleLoader {
|
||||
if (fileName.startsWith("assets://")) {
|
||||
bridge.loadScriptFromAssets(context.getAssets(), fileName.replaceFirst("assets://", ""));
|
||||
} else {
|
||||
bridge.loadScriptFromFile(fileName, fileName);
|
||||
bridge.loadScriptFromFile(fileName, "file://" + fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user