diff options
Diffstat (limited to 'server-beta/src/core/getfield.lua')
-rw-r--r-- | server-beta/src/core/getfield.lua | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/server-beta/src/core/getfield.lua b/server-beta/src/core/getfield.lua index 77a132ca..03aa7854 100644 --- a/server-beta/src/core/getfield.lua +++ b/server-beta/src/core/getfield.lua @@ -15,18 +15,20 @@ function m:field(source, key, callback) local myKey = guide.getKeyName(source) if key == myKey then - callback(source.field, 'get') + callback(source, 'get') 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) |