diff --git a/public/js/dashboard.js b/public/js/dashboard.js index 6efba20..8cff959 100644 --- a/public/js/dashboard.js +++ b/public/js/dashboard.js @@ -136,10 +136,13 @@ async function requestChange() .then(result => result.json()) .then(res => { - let music = document.getElementById('music') - music.textContent = res.music? 'check_box' :'check_box_outline_blank'; - let strikes = document.getElementById('strikes') - strikes.textContent = res.strikes? 'check_box' :'check_box_outline_blank'; + if(!res.error) + { + let music = document.getElementById('music') + music.textContent = res.music? 'check_box' :'check_box_outline_blank'; + let strikes = document.getElementById('strikes') + strikes.textContent = res.strikes? 'check_box' :'check_box_outline_blank'; + } }) .catch(console.error); } \ No newline at end of file