projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bb4822
)
luci-base: luci.util: rewrite threadlocal code to not confuse minifier
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 8 Jan 2015 14:56:35 +0000
(15:56 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 8 Jan 2015 15:26:20 +0000
(16:26 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-base/luasrc/util.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/util.lua
b/modules/luci-base/luasrc/util.lua
index da761e219ae960441f3c0ba13a2c929eb74b2cc0..060e45f951313be863d835de274c2c7214f5321f 100644
(file)
--- 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
- r
awget(self, c)
[key] = value
+ r[key] = value
end
end
}