From 2c5eb18bc95cf84cc91791c97b2fbf0e470e3cbd Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 7 Jun 2023 22:35:57 +0200 Subject: [PATCH] Fix crash --- Shared/Home/FavoriteItemView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shared/Home/FavoriteItemView.swift b/Shared/Home/FavoriteItemView.swift index 9d11363e..e1282570 100644 --- a/Shared/Home/FavoriteItemView.swift +++ b/Shared/Home/FavoriteItemView.swift @@ -204,7 +204,8 @@ struct FavoriteItemView: View { } func watch(_ item: ContentItem) -> Watch? { - watches.first { $0.videoID == item.video.videoID } + guard let id = item.video?.videoID else { return nil } + return watches.first { $0.videoID == id } } var widgetListingStyle: WidgetListingStyle {