summaryrefslogtreecommitdiff
path: root/script-beta/vm/eachField.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-29 20:43:01 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-29 20:43:01 +0800
commitd5ecec7f362db69879e5097e41bd334d76260783 (patch)
tree1b14ddf979adfb684a49d7db9d640b35d224c338 /script-beta/vm/eachField.lua
parente98483d89ac38463cf5b717a3b19861baf8f3e94 (diff)
downloadlua-language-server-d5ecec7f362db69879e5097e41bd334d76260783.zip
整理代码
Diffstat (limited to 'script-beta/vm/eachField.lua')
-rw-r--r--script-beta/vm/eachField.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script-beta/vm/eachField.lua b/script-beta/vm/eachField.lua
index b644cbd9..90892f03 100644
--- a/script-beta/vm/eachField.lua
+++ b/script-beta/vm/eachField.lua
@@ -51,15 +51,15 @@ function vm.getFields(source, deep)
local name = guide.getKeyName(source)
local cache = vm.getCache('eachFieldOfGlobal')[name]
or vm.getCache('eachField')[source]
- or eachField(source, deep)
+ or eachField(source, 'deep')
vm.getCache('eachFieldOfGlobal')[name] = cache
return cache
- elseif not deep then
- return eachField(source, deep)
else
local cache = vm.getCache('eachField')[source]
or eachField(source, deep)
- vm.getCache('eachField')[source] = cache
+ if deep then
+ vm.getCache('eachField')[source] = cache
+ end
return cache
end
end