summaryrefslogtreecommitdiff
path: root/server-beta/src/core/setindex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/core/setindex.lua')
-rw-r--r--server-beta/src/core/setindex.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/server-beta/src/core/setindex.lua b/server-beta/src/core/setindex.lua
index 60813166..0c0913dc 100644
--- a/server-beta/src/core/setindex.lua
+++ b/server-beta/src/core/setindex.lua
@@ -13,18 +13,20 @@ function m:field(source, key, callback)
local myKey = guide.getKeyName(source)
if key == myKey then
- callback(source, 'get')
+ callback(source, 'set')
end
- self:eachField(node, key, function (src, mode)
- if used[src] then
- return
- end
- used[src] = true
- if mode == 'set' then
- callback(src, mode)
- found = true
- end
+ self:eachField(node, myKey, function (src, mode)
+ self:eachField(src, key, function (src, mode)
+ if used[src] then
+ return
+ end
+ used[src] = true
+ if mode == 'set' then
+ callback(src, mode)
+ found = true
+ end
+ end)
end)
self:eachValue(node, function (src)