[typo] cpuTemp bad declaration (#151)
As the variable cpuTemp can now be used later in the if block for the fallback, need to change the declaration so that the variable is unique and used in two different blocks. Const will redeclare it.. My bad on this
This commit is contained in:
parent
113134d61d
commit
9c0223da60
1 changed files with 2 additions and 2 deletions
|
|
@ -160,10 +160,10 @@ Singleton {
|
|||
})
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
const cpuTemp = text.match(/(?:Package id [0-9]+|Tdie):\s+((\+|-)[0-9.]+)(°| )C/);
|
||||
let cpuTemp = text.match(/(?:Package id [0-9]+|Tdie):\s+((\+|-)[0-9.]+)(°| )C/);
|
||||
if (!cpuTemp) {
|
||||
// If AMD Tdie pattern failed, try fallback on Tctl
|
||||
const cpuTemp = text.match(/Tctl:\s+((\+|-)[0-9.]+)(°| )C/);
|
||||
cpuTemp = text.match(/Tctl:\s+((\+|-)[0-9.]+)(°| )C/);
|
||||
}
|
||||
if (cpuTemp)
|
||||
root.cpuTemp = parseFloat(cpuTemp[1]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue