This commit is contained in:
Dominik 2026-01-02 18:02:44 +01:00 committed by GitHub
commit 1b02b2e748
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ extension SpotubeImageExtensions on List<SpotubeImageObject>? {
int index = 1,
required ImagePlaceholder placeholder,
}) {
final sortedImage = this?.sorted((a, b) => a.width!.compareTo(b.width!));
final sortedImage = this?.sorted((a, b) => (a.width ?? 0).compareTo(b.width ?? 0));
return sortedImage != null && sortedImage.isNotEmpty
? sortedImage[