Skip to content

High performance self-hosted photo and video management solution.

Fix cannot query shared album on mobile (#298)

Alex7586c651035e
diff --git a/mobile/lib/modules/sharing/models/shared_album.model.dart b/mobile/lib/modules/sharing/models/shared_album.model.dart
index cb4b990434..d8f1468927 100644
--- a/mobile/lib/modules/sharing/models/shared_album.model.dart
+++ b/mobile/lib/modules/sharing/models/shared_album.model.dart
@@ -72,7 +72,10 @@ class SharedAlbum {
albumThumbnailAssetId: map['albumThumbnailAssetId'],
sharedUsers:
List<User>.from(map['sharedUsers']?.map((x) => User.fromMap(x))),
- assets: map['assets']?.map((x) => ImmichAsset.fromMap(x)).toList(),
+ assets: map['assets'] != null
+ ? List<ImmichAsset>.from(
+ map['assets']?.map((x) => ImmichAsset.fromMap(x)))
+ : null,
);
}