Update spotify.ts

Signed-off-by: skidoodle <contact@albert.lol>
This commit is contained in:
skidoodle 2024-01-21 19:23:26 +01:00 committed by GitHub
parent 9a5ac2e681
commit c6bef350e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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