Skip to content

Commit 050dbd3

Browse files
committed
Allow widget to be a function again
This was broke by async support.
1 parent eb64e0d commit 050dbd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ local function update(widget, reg, disablecache)
8282
if c and c.time and c.data and t < c.time+reg.timer and not disablecache then
8383
return update_value(format_data(c.data))
8484
elseif reg.wtype then
85-
if reg.wtype.async then
85+
if type(reg.wtype) == "table" and reg.wtype.async then
8686
if not reg.lock then
8787
reg.lock = true
8888
return reg.wtype.async(reg.format,

0 commit comments

Comments
 (0)