mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-14 00:14:14 +09:00
getSmartData(...) temperature is undefined #209 this will ignore any drive without a temperature.
This commit is contained in:
@@ -39,6 +39,10 @@ export default class SmartctlUtil {
|
|||||||
if (attributes["smartctl"]["exit_status"] != 0)
|
if (attributes["smartctl"]["exit_status"] != 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
if(!attributes.temperature) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
label: info["model_name"],
|
label: info["model_name"],
|
||||||
temp: parseFloat(attributes.temperature.current)
|
temp: parseFloat(attributes.temperature.current)
|
||||||
|
|||||||
Reference in New Issue
Block a user