Update spotify.ts

Signed-off-by: skidoodle <contact@albert.lol>
This commit is contained in:
skidoodle 2024-01-21 19:27:23 +01:00 committed by GitHub
parent c6bef350e8
commit c634d9225a
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 || !song) {
if (!song || !song.is_playing) {
return res.status(200).json({
is_playing: false,
})