X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Futil.lua;h=060e45f951313be863d835de274c2c7214f5321f;hp=da761e219ae960441f3c0ba13a2c929eb74b2cc0;hb=fa84ca05d59b26d918f0730cc16680688c639139;hpb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92 diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua index da761e219..060e45f95 100644 --- a/modules/luci-base/luasrc/util.lua +++ b/modules/luci-base/luasrc/util.lua @@ -125,10 +125,11 @@ local tl_meta = { __newindex = function(self, key, value) local c = coxpt[coroutine.running()] or coroutine.running() or 0 - if not rawget(self, c) then + local r = rawget(self, c) + if not r then rawset(self, c, { [key] = value }) else - rawget(self, c)[key] = value + r[key] = value end end }