diff options
Diffstat (limited to 'widgets/bat.lua')
-rw-r--r-- | widgets/bat.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/bat.lua b/widgets/bat.lua index 4d9b06c..615f9dd 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -65,7 +65,7 @@ local function worker(format, warg) -- Calculate remaining (charging or discharging) time local time = "N/A" - if rate ~= nil then + if tonumber(rate) then if state == "+" then timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate) elseif state == "-" then |