From c6bef350e87f613fd7651f42f6c2f87b8d54fe61 Mon Sep 17 00:00:00 2001 From: skidoodle Date: Sun, 21 Jan 2024 19:23:26 +0100 Subject: [PATCH] Update spotify.ts Signed-off-by: skidoodle --- src/pages/api/spotify.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/spotify.ts b/src/pages/api/spotify.ts index f5ff0f8..324cdc4 100644 --- a/src/pages/api/spotify.ts +++ b/src/pages/api/spotify.ts @@ -21,7 +21,7 @@ export default async function handler( ) { try { const song = await spotify.getCurrentSong() - if (!song.is_playing) { + if (!song.is_playing || !song) { return res.status(200).json({ is_playing: false, })