diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-21 16:40:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-21 16:40:07 +0800 |
commit | 8af599790936f81cddaecb31d36eede70ad3739c (patch) | |
tree | 184f86524a29848869801ae01f2f21e3b4da1878 /script/core | |
parent | 8f4f9a7122168ba3944ec4fa791b94c8eff8750f (diff) | |
download | lua-language-server-8af599790936f81cddaecb31d36eede70ad3739c.zip |
fix
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/completion/completion.lua | 2 | ||||
-rw-r--r-- | script/core/diagnostics/assign-type-mismatch.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index 1ddd9890..165dbac5 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -1241,7 +1241,7 @@ local function tryIndex(state, position, results) if not parent then return end - local word = parent.next.index[1] + local word = parent.next and parent.next.index and parent.next.index[1] checkField(state, word, position, position, parent, oop, results) end diff --git a/script/core/diagnostics/assign-type-mismatch.lua b/script/core/diagnostics/assign-type-mismatch.lua index c6a4195c..ae4b3512 100644 --- a/script/core/diagnostics/assign-type-mismatch.lua +++ b/script/core/diagnostics/assign-type-mismatch.lua @@ -50,7 +50,7 @@ return function (uri, callback) end end end - local varNode = vm.compileNode(source) + local varNode = vm.compileNode(source) if vm.canCastType(uri, varNode, valueNode) then return end |