init: stop allocating reg table functions with properties
This partly reverts commit f1844decef
because a user reported seeing
nil passed as the object to the reg.update() function.
This commit is contained in:
parent
52cbb64144
commit
c51e13c35d
9
init.lua
9
init.lua
|
@ -152,12 +152,11 @@ function vicious.register(widget, wtype, format, timer, warg)
|
|||
timer = timer,
|
||||
warg = warg,
|
||||
widget = widget,
|
||||
|
||||
-- Update function
|
||||
update = function ()
|
||||
update(widget, reg)
|
||||
end,
|
||||
}
|
||||
-- Set functions
|
||||
reg.update = function ()
|
||||
update(widget, reg)
|
||||
end
|
||||
|
||||
-- Default to 2s timer
|
||||
if reg.timer == nil then
|
||||
|
|
Loading…
Reference in New Issue