diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-25 14:48:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-25 14:48:16 +0800 |
commit | 4131091ef31c260df3f9eeb4f62de8a02b444f72 (patch) | |
tree | 20e825fa108c616a3bbd85cf3bb4212f1823d434 | |
parent | 38ee6898c125f425470b9873370a5df5f60a64f8 (diff) | |
download | lua-language-server-4131091ef31c260df3f9eeb4f62de8a02b444f72.zip |
tablefield不一定有field
-rw-r--r-- | script-beta/core/completion.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index b461094d..6f07459b 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -290,6 +290,9 @@ local function checkTableField(ast, word, start, results) end local used = {} guide.eachSourceType(ast.ast, 'tablefield', function (src) + if not src.field then + return + end local key = src.field[1] if not used[key] and matchKey(word, key) |