diff --git a/Whisky/Views/Bottle/Pins/PinView.swift b/Whisky/Views/Bottle/Pins/PinView.swift index c3b97601..227f406a 100644 --- a/Whisky/Views/Bottle/Pins/PinView.swift +++ b/Whisky/Views/Bottle/Pins/PinView.swift @@ -85,8 +85,8 @@ struct PinView: View { .task { name = pin.name guard let peFile = program.peFile else { return } - let task = Task.detached { - guard let image = peFile.bestIcon() else { return nil } + let task = Task.detached { + guard let image = peFile.bestIcon() else { return nil as Image? } return Image(nsImage: image) } self.image = await task.value diff --git a/Whisky/Views/Programs/ProgramView.swift b/Whisky/Views/Programs/ProgramView.swift index f6be3601..2cc717dd 100644 --- a/Whisky/Views/Programs/ProgramView.swift +++ b/Whisky/Views/Programs/ProgramView.swift @@ -111,8 +111,8 @@ struct ProgramView: View { } .task { guard let peFile = program.peFile else { return } - let task = Task.detached { - guard let image = peFile.bestIcon() else { return nil } + let task = Task.detached { + guard let image = peFile.bestIcon() else { return nil as Image? } return Image(nsImage: image) } self.image = await task.value