fix: null check (#21536)

This commit is contained in:
Alex 2025-09-02 19:21:41 -05:00 committed by GitHub
parent 674faf2e57
commit 5ce946bb5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -286,7 +286,7 @@ extension on Iterable<PlatformAlbum> {
(e) => LocalAlbum(
id: e.id,
name: e.name,
updatedAt: tryFromSecondsSinceEpoch(e.updatedAt!) ?? DateTime.now(),
updatedAt: tryFromSecondsSinceEpoch(e.updatedAt) ?? DateTime.now(),
assetCount: e.assetCount,
),
).toList();
@ -301,8 +301,8 @@ extension on Iterable<PlatformAsset> {
name: e.name,
checksum: null,
type: AssetType.values.elementAtOrNull(e.type) ?? AssetType.other,
createdAt: tryFromSecondsSinceEpoch(e.createdAt!) ?? DateTime.now(),
updatedAt: tryFromSecondsSinceEpoch(e.updatedAt!) ?? DateTime.now(),
createdAt: tryFromSecondsSinceEpoch(e.createdAt) ?? DateTime.now(),
updatedAt: tryFromSecondsSinceEpoch(e.updatedAt) ?? DateTime.now(),
width: e.width,
height: e.height,
durationInSeconds: e.durationInSeconds,