mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 19:52:20 +01:00
Fix beeldscherm by resolving null to marietje
This commit is contained in:
@ -59,7 +59,13 @@
|
|||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then(json => {
|
.then(json => {
|
||||||
updateScreen(json.current_song.user.name, json.current_song.song.artist, json.current_song.song.title);
|
let requestor;
|
||||||
|
if(json.current_song.user === null) {
|
||||||
|
requestor = "Marietje";
|
||||||
|
} else {
|
||||||
|
requestor = json.current_song.user.name;
|
||||||
|
}
|
||||||
|
updateScreen(requestor, json.current_song.song.artist, json.current_song.song.title);
|
||||||
setTimeout(fetchCurrentQueue, 1000);
|
setTimeout(fetchCurrentQueue, 1000);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
if(err.name == "NotLoggedIn") {
|
if(err.name == "NotLoggedIn") {
|
||||||
|
|||||||
Reference in New Issue
Block a user