getSmartData(...) temperature is undefined #209 this will ignore any drive without a temperature.

This commit is contained in:
steveip
2024-03-25 22:53:13 +00:00
parent 04de227024
commit 96868b18d8

View File

@@ -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)