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,
|
timer = timer,
|
||||||
warg = warg,
|
warg = warg,
|
||||||
widget = widget,
|
widget = widget,
|
||||||
|
|
||||||
-- Update function
|
|
||||||
update = function ()
|
|
||||||
update(widget, reg)
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
-- Set functions
|
||||||
|
reg.update = function ()
|
||||||
|
update(widget, reg)
|
||||||
|
end
|
||||||
|
|
||||||
-- Default to 2s timer
|
-- Default to 2s timer
|
||||||
if reg.timer == nil then
|
if reg.timer == nil then
|
||||||
|
|
Loading…
Reference in New Issue