Guard against nil in "time to empty/full"
This commit is contained in:
parent
4f0f674771
commit
1826fdcea9
|
@ -76,8 +76,10 @@ function widget:update()
|
|||
what = "Full"
|
||||
when = self.device.TimeToFull
|
||||
end
|
||||
if when then
|
||||
charge_status_msg = string.format("\n%s in %s", what, to_hour_min_str(when))
|
||||
end
|
||||
end
|
||||
|
||||
self.tooltip:set_text(
|
||||
string.format(
|
||||
|
|
Loading…
Reference in New Issue