summaryrefslogtreecommitdiff
path: root/server-beta/src/searcher/getfield.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/searcher/getfield.lua')
-rw-r--r--server-beta/src/searcher/getfield.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/server-beta/src/searcher/getfield.lua b/server-beta/src/searcher/getfield.lua
index f3c3df16..2fcd2d4b 100644
--- a/server-beta/src/searcher/getfield.lua
+++ b/server-beta/src/searcher/getfield.lua
@@ -66,9 +66,11 @@ function m:eachField(source, key, callback)
checkSMT(self, key, used, found, callback)
end
-function m:eachValue(source, callback)
- if source.value then
- self:eachValue(source.value, callback)
+function m:getValue(source)
+ if source.type == 'setfield'
+ or source.type == 'setmethod'
+ or source.type == 'setindex' then
+ return source.value and self:getValue(source.value)
end
end