Allow widget to be a function again

This was broke by async support.
This commit is contained in:
Joerg Thalheim 2017-11-28 18:18:59 +00:00
parent eb64e0dd3a
commit 050dbd30d3
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ local function update(widget, reg, disablecache)
if c and c.time and c.data and t < c.time+reg.timer and not disablecache then
return update_value(format_data(c.data))
elseif reg.wtype then
if reg.wtype.async then
if type(reg.wtype) == "table" and reg.wtype.async then
if not reg.lock then
reg.lock = true
return reg.wtype.async(reg.format,