Fix temp widget show N/A when no sensor found (#528)

This commit is contained in:
Albin Wahlén 2022-03-26 18:58:50 +01:00 committed by GitHub
parent 07cf82e3b2
commit 57dee4c91b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,11 @@ local function factory(args)
temp_now[t] = temp_value and temp_value/1e3 or temp_fl
end
end
coretemp_now = string.format(format, temp_now[tempfile]) or "N/A"
if temp_now[tempfile] then
coretemp_now = string.format(format, temp_now[tempfile])
else
coretemp_now = "N/A"
end
widget = temp.widget
settings()
end)