summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-21 16:40:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-21 16:40:05 +0800
commita2c2bb6987f97788c165126ba6e41c69e08d0aee (patch)
treed5ce7b710cf298d1b8f645fb7845d47d9309d8de /script/core
parent9f8ba964b3c36001e82df3e55c95e97431aecb1e (diff)
downloadlua-language-server-a2c2bb6987f97788c165126ba6e41c69e08d0aee.zip
check nil
Diffstat (limited to 'script/core')
-rw-r--r--script/core/searcher.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 852f7b2a..6554779f 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -856,6 +856,9 @@ function m.searchRefsByID(status, uri, expect, mode)
end
local function prepareSearch(source)
+ if not source then
+ return
+ end
if source.type == 'field'
or source.type == 'method' then
source = source.parent