Switch equality check in BlobModule.java
Summary: Switch the equality check to avoid crash on the first item. The check can be on a null object and return the correct result. Fixes #18709 Just a simple switch on equals, to make sure we're not bombing out by having a null scheme. No related PRs and does not require a document change. [ANDROID][BUGFIX][BlobModule] Switch equality check in BlobModule.java Closes https://github.com/facebook/react-native/pull/18893 Differential Revision: D7658036 Pulled By: hramos fbshipit-source-id: db61b98dae178dbbb645070f7b0d73ab43d30541
This commit is contained in:
parent
f8091fac04
commit
5bb2e83f65
|
@ -79,7 +79,7 @@ public class BlobModule extends ReactContextBaseJavaModule {
|
|||
@Override
|
||||
public boolean supports(Uri uri, String responseType) {
|
||||
String scheme = uri.getScheme();
|
||||
boolean isRemote = scheme.equals("http") || scheme.equals("https");
|
||||
boolean isRemote = "http".equals(scheme) || "https".equals(scheme);
|
||||
|
||||
return (!isRemote && responseType.equals("blob"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue