diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-21 21:02:19 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-21 21:02:19 +0800 |
commit | 3bd61890073f9ff69b214e84843c71be94890edc (patch) | |
tree | 0c337baab88b6233ffac0e36daffcf0993997fc6 /server-beta/src/vm/eachField.lua | |
parent | 442b2d559537ed0caeb9116bf904bd93002aaa8b (diff) | |
download | lua-language-server-3bd61890073f9ff69b214e84843c71be94890edc.zip |
检查class
Diffstat (limited to 'server-beta/src/vm/eachField.lua')
-rw-r--r-- | server-beta/src/vm/eachField.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server-beta/src/vm/eachField.lua b/server-beta/src/vm/eachField.lua index 549a7dec..1d3d222d 100644 --- a/server-beta/src/vm/eachField.lua +++ b/server-beta/src/vm/eachField.lua @@ -133,7 +133,10 @@ function vm.eachField(source, callback) local cache = vm.cache.eachField[source] if cache then for i = 1, #cache do - callback(cache[i]) + local res = callback(cache[i]) + if res ~= nil then + return res + end end return end @@ -158,6 +161,9 @@ function vm.eachField(source, callback) vm.cache.eachField[src] = cache end) for i = 1, #cache do - callback(cache[i]) + local res = callback(cache[i]) + if res ~= nil then + return res + end end end |