summaryrefslogtreecommitdiff
path: root/script/vm/getDocs.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-02 19:25:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-02 19:25:37 +0800
commit36a5c10b00160c85a8c29170b5d5de8b27b4a5c9 (patch)
treef6db7d3d69bc24fecf16f3a3439d489dc5c43bf9 /script/vm/getDocs.lua
parentc16264eac3b25f6f2bce14b0504071787bd2bc54 (diff)
downloadlua-language-server-36a5c10b00160c85a8c29170b5d5de8b27b4a5c9.zip
mark async
Diffstat (limited to 'script/vm/getDocs.lua')
-rw-r--r--script/vm/getDocs.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua
index 260d2281..22e2e0cd 100644
--- a/script/vm/getDocs.lua
+++ b/script/vm/getDocs.lua
@@ -164,6 +164,9 @@ local function isDeprecated(value)
end
local function isAsync(value)
+ if value.type ~= 'function' then
+ return false
+ end
if not value.bindDocs then
return false
end
@@ -204,11 +207,11 @@ function vm.isAsync(value, deep)
return false
end
for _, def in ipairs(defs) do
- if not isAsync(def) then
- return false
+ if isAsync(def) then
+ return true
end
end
- return true
+ return false
else
return isAsync(value)
end