From ec1f9360c4f1f565a1427cafe567c39c5a060c33 Mon Sep 17 00:00:00 2001 From: cryptofyre Date: Sun, 9 Jan 2022 13:24:17 -0600 Subject: [PATCH] Fix song playback. --- src/preload/cider-preload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js index 4ca3b4cf..7d5296a6 100644 --- a/src/preload/cider-preload.js +++ b/src/preload/cider-preload.js @@ -36,7 +36,7 @@ const MusicKitInterop = { const nowPlayingItem = MusicKit.getInstance().nowPlayingItem; const isPlayingExport = MusicKit.getInstance().isPlaying; const remainingTimeExport = MusicKit.getInstance().currentPlaybackTimeRemaining; - const attributes = nowPlayingItem.attributes ?? {}; + const attributes = (nowPlayingItem != null ? nowPlayingItem.attributes : {}); attributes.status = isPlayingExport ?? false; attributes.name = attributes?.name ?? 'No Title Found';