summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-19 17:26:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-19 17:26:39 +0800
commit2450e9c8d9bf5cae3f162e0d5bc51c41bf624478 (patch)
tree1ae74cec79ad5da86cfd68092dec8c70481d84cb
parent4d90c2dc34a1394668f7f5dc75cd5dfa87373767 (diff)
downloadlua-language-server-2450e9c8d9bf5cae3f162e0d5bc51c41bf624478.zip
check nil
-rw-r--r--script/core/highlight.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/highlight.lua b/script/core/highlight.lua
index 74025ca9..8955be69 100644
--- a/script/core/highlight.lua
+++ b/script/core/highlight.lua
@@ -333,6 +333,9 @@ return function (uri, offset)
else
return
end
+ if not target then
+ return
+ end
results[#results+1] = {
start = target.start,
finish = target.finish,