Updated Duration Picker during Recipe Editing

This commit is contained in:
VincentMeilinger
2024-03-01 15:32:04 +01:00
parent 744ea76a34
commit 650df2b67e
13 changed files with 733 additions and 525 deletions

View File

@@ -46,7 +46,7 @@ class ObservableRecipeDetail: ObservableObject {
init(_ recipeDetail: RecipeDetail) {
id = recipeDetail.id
name = recipeDetail.name
keywords = recipeDetail.keywords.components(separatedBy: ",")
keywords = recipeDetail.keywords.isEmpty ? [] : recipeDetail.keywords.components(separatedBy: ",")
imageUrl = recipeDetail.imageUrl
prepTime = DurationComponents.fromPTString(recipeDetail.prepTime ?? "")
cookTime = DurationComponents.fromPTString(recipeDetail.cookTime ?? "")