cpuCurrentSpeed() fix cpu loop issue

This commit is contained in:
Sebastian Hildebrandt
2025-12-30 09:43:06 +01:00
parent ff7137d794
commit a4dccd461c
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1238,7 +1238,7 @@ function getCpuCurrentSpeedSync() {
const cores = [];
const speeds = [];
if (cpus && count.length && Object.prototype.hasOwnProperty.call(cpus[0], 'speed')) {
if (cpus && cpus.length && Object.prototype.hasOwnProperty.call(cpus[0], 'speed')) {
for (let i in cpus) {
speeds.push(cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10);
}