diff --git a/src/classes/ramwatcher.class.js b/src/classes/ramwatcher.class.js index 5c33f17e..a55f2fff 100644 --- a/src/classes/ramwatcher.class.js +++ b/src/classes/ramwatcher.class.js @@ -66,7 +66,7 @@ class RAMwatcher { // Update swap indicator let usedSwap = Math.round((100*data.swapused)/data.swaptotal); - document.getElementById("mod_ramwatcher_swapbar").value = usedSwap; + document.getElementById("mod_ramwatcher_swapbar").value = usedSwap || 0; let usedSwapGiB = Math.round((data.swapused/1073742000)*10)/10; document.getElementById("mod_ramwatcher_swaptext").innerText = `${usedSwapGiB} GiB`;