summaryrefslogtreecommitdiff
path: root/server-beta/src/core/getfield.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/core/getfield.lua')
-rw-r--r--server-beta/src/core/getfield.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/server-beta/src/core/getfield.lua b/server-beta/src/core/getfield.lua
index c7d16316..fd0c8f33 100644
--- a/server-beta/src/core/getfield.lua
+++ b/server-beta/src/core/getfield.lua
@@ -29,11 +29,14 @@ function m:field(source, key, callback)
self:eachRef(source, function (src)
used[src] = true
- local child, mode = self:childMode(src)
+ local child, mode, value = self:childMode(src)
if child then
if key == guide.getKeyName(child) then
callback(child, mode)
end
+ if value then
+ self:eachField(value, key, callback)
+ end
return
end
if src.type == 'getglobal' then
@@ -45,13 +48,7 @@ function m:field(source, key, callback)
end
end
elseif src.type == 'setglobal' then
- local parent = src.parent
- child, mode = self:childMode(parent)
- if child then
- if key == guide.getKeyName(child) then
- callback(child, mode)
- end
- end
+ self:eachField(src.value, key, callback)
else
self:eachField(src, key, callback)
end