gui: fix closure of update function

Thanks @Road-block
This commit is contained in:
shagu
2019-03-31 14:59:21 +02:00
parent ff637a1d2d
commit b6865a1da8
+2 -2
View File
@@ -19,9 +19,9 @@ pfUI:RegisterModule("gui", function ()
U = setmetatable({}, { __index = function(tab,key)
local ufunc
if pfUI[key] and pfUI[key].UpdateConfig then
ufunc = pfUI[key].UpdateConfig
ufunc = function() return pfUI[key]:UpdateConfig() end
elseif pfUI.uf and pfUI.uf[key] and pfUI.uf[key].UpdateConfig then
ufunc = pfUI.uf[key].UpdateConfig
ufunc = function() return pfUI.uf[key]:UpdateConfig() end
end
if ufunc then
rawset(tab,key,ufunc)