summaryrefslogtreecommitdiff
path: root/script-beta/vm/eachField.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-28 02:11:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-28 02:11:41 +0800
commitbae604f2485e1a601d5ac30e5761ee601ba00c7e (patch)
tree09143693ec2aa7e1b2d4727b5ee7434ea65cfcf3 /script-beta/vm/eachField.lua
parent6032d2ad73bd583b7077a15a38f515494068698e (diff)
downloadlua-language-server-bae604f2485e1a601d5ac30e5761ee601ba00c7e.zip
支持局部变量属性
Diffstat (limited to 'script-beta/vm/eachField.lua')
-rw-r--r--script-beta/vm/eachField.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/vm/eachField.lua b/script-beta/vm/eachField.lua
index b49abcad..632cf211 100644
--- a/script-beta/vm/eachField.lua
+++ b/script-beta/vm/eachField.lua
@@ -64,6 +64,9 @@ end
function vm.eachField(source, callback)
local results = vm.getFields(source)
+ if not results then
+ return
+ end
for i = 1, #results do
callback(results[i])
end