Commit ae3d4f7 1 parent 7b05b09 commit ae3d4f7 Copy full SHA for ae3d4f7
File tree 1 file changed +8
-5
lines changed
ReactAndroid/src/main/java/com/facebook/react/modules/image
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 8
8
package com .facebook .react .modules .image ;
9
9
10
10
import android .net .Uri ;
11
+ import android .text .TextUtils ;
11
12
import android .util .SparseArray ;
12
13
import androidx .annotation .NonNull ;
13
14
import androidx .annotation .Nullable ;
@@ -276,11 +277,13 @@ protected void doInBackgroundGuarded(Void... params) {
276
277
ImagePipeline imagePipeline = getImagePipeline ();
277
278
for (int i = 0 ; i < uris .size (); i ++) {
278
279
String uriString = uris .getString (i );
279
- final Uri uri = Uri .parse (uriString );
280
- if (imagePipeline .isInBitmapMemoryCache (uri )) {
281
- result .putString (uriString , "memory" );
282
- } else if (imagePipeline .isInDiskCacheSync (uri )) {
283
- result .putString (uriString , "disk" );
280
+ if (!TextUtils .isEmpty (uriString )) {
281
+ final Uri uri = Uri .parse (uriString );
282
+ if (imagePipeline .isInBitmapMemoryCache (uri )) {
283
+ result .putString (uriString , "memory" );
284
+ } else if (imagePipeline .isInDiskCacheSync (uri )) {
285
+ result .putString (uriString , "disk" );
286
+ }
284
287
}
285
288
}
286
289
promise .resolve (result );
You can’t perform that action at this time.
0 commit comments