Skip to content

Commit a29b519

Browse files
fix: preload source uri empty crash (#8)
1 parent ef86372 commit a29b519

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/src/main/java/com/dylanvann/fastimage/FastImageViewModule.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public void run() {
3838
for (int i = 0; i < sources.size(); i++) {
3939
final ReadableMap source = sources.getMap(i);
4040
final FastImageSource imageSource = FastImageViewConverter.getImageSource(activity, source);
41-
41+
if (source == null || !source.hasKey("uri") || source.getString("uri").isEmpty()) {
42+
System.out.println("Source is null or URI is empty");
43+
continue;
44+
}
4245
Glide
4346
.with(activity.getApplicationContext())
4447
// This will make this work for remote and local images. e.g.

0 commit comments

Comments
 (0)