init: never pass nil into awful.widget widgets
This commit is contained in:
parent
6f79227ca1
commit
fa40e402a7
4
init.lua
4
init.lua
|
@ -114,9 +114,9 @@ local function update(widget, reg, disablecache)
|
||||||
end
|
end
|
||||||
|
|
||||||
if widget.add_value ~= nil then
|
if widget.add_value ~= nil then
|
||||||
widget:add_value(tonumber(data) / 100)
|
widget:add_value(data and tonumber(data) / 100)
|
||||||
elseif widget.set_value ~= nil then
|
elseif widget.set_value ~= nil then
|
||||||
widget:set_value(tonumber(data) / 100)
|
widget:set_value(data and tonumber(data) / 100)
|
||||||
else
|
else
|
||||||
widget.text = data
|
widget.text = data
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue