From 796319b105d4ad104a2beb3fdf791401dd4ce483 Mon Sep 17 00:00:00 2001 From: Cristiano Pires Date: Sun, 26 Feb 2023 01:16:57 +0000 Subject: [PATCH] fix --- public/js/dashboard.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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