From c634d9225a00abace0edbc8421650556c3cac00f Mon Sep 17 00:00:00 2001 From: skidoodle Date: Sun, 21 Jan 2024 19:27:23 +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 324cdc4..b672b33 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 || !song) { + if (!song || !song.is_playing) { return res.status(200).json({ is_playing: false, })