summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-31 19:26:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-31 19:26:07 +0800
commit41dfb71cfffd47663f821d8c1bd712b333810281 (patch)
tree6916ce8e071a9aee5bde5aae1d2bf0e5c6f46327 /script
parent05b2d2faf2f5d07c660d46f8eac5fd5cfc56c47b (diff)
downloadlua-language-server-41dfb71cfffd47663f821d8c1bd712b333810281.zip
check nil
Diffstat (limited to 'script')
-rw-r--r--script/core/completion/completion.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 1f089c61..0ec503de 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -130,7 +130,7 @@ local function findNearestTable(state, position)
end
end
if field.type == 'tableindex' then
- if field.index.type == 'string' then
+ if field.index and field.index.type == 'string' then
if field.index.finish >= position then
return source
else