summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-13 15:09:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-13 15:09:19 +0800
commit745a3fe1a9d33584fcda6abd5925af544f4897e3 (patch)
treefe035c4510ed15d3b17691679bdcf95bd5a6fca3 /server/src/core
parent6bfa937b6fc8bdd00ba009e4077107e6c76ce025 (diff)
downloadlua-language-server-745a3fe1a9d33584fcda6abd5925af544f4897e3.zip
修正一个报错
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/signature.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/core/signature.lua b/server/src/core/signature.lua
index 7d217593..6cb3bca5 100644
--- a/server/src/core/signature.lua
+++ b/server/src/core/signature.lua
@@ -24,6 +24,9 @@ local function findCall(vm, pos)
end
local function getSelect(args, pos)
+ if not args then
+ return 1
+ end
for i, arg in ipairs(args) do
if arg.start <= pos and arg.finish >= pos - 1 then
return i