Update spotify.ts

Signed-off-by: skidoodle <contact@albert.lol>
This commit is contained in:
2024-01-21 19:23:26 +01:00
committed by GitHub
parent 9a5ac2e681
commit c6bef350e8

View File

@@ -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,
})