From eb5cee2a7574d1ab531584160ccc293bc272828e Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Fri, 14 Feb 2020 14:54:52 -0500 Subject: [PATCH] Fix potential race --- .../Components/Browser/Album Detail/AlbumDetailView.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Persephone/Components/Browser/Album Detail/AlbumDetailView.swift b/Persephone/Components/Browser/Album Detail/AlbumDetailView.swift index 0ffe776..9f3a9a9 100644 --- a/Persephone/Components/Browser/Album Detail/AlbumDetailView.swift +++ b/Persephone/Components/Browser/Album Detail/AlbumDetailView.swift @@ -120,13 +120,11 @@ class AlbumDetailView: NSViewController { DispatchQueue.main.async { self.albumTracksView.reloadData() - } - guard let song = self.dataSource.albumSongs.first?.song ?? - self.dataSource.albumSongs[1].song - else { return } + guard let song = self.dataSource.albumSongs.first?.song ?? + self.dataSource.albumSongs[1].song + else { return } - DispatchQueue.main.async { self.getBigCoverArt(song: song, album: album) } }