summaryrefslogtreecommitdiff
path: root/script/core/searcher.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-21 14:53:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-21 14:53:42 +0800
commit0169983a752d55e2dc995b88b72badc74aa0f0ab (patch)
tree5edf7ed0f04ddf2d57dc81c3c5b9bf42e61de222 /script/core/searcher.lua
parentb3c1757e7067ef47ffa83c66a7ea747187097593 (diff)
downloadlua-language-server-0169983a752d55e2dc995b88b72badc74aa0f0ab.zip
fix
Diffstat (limited to 'script/core/searcher.lua')
-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 3055a5f4..79b605b5 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -657,6 +657,9 @@ local function prepareSearch(source)
or source.type == 'method' then
source = source.parent
end
+ if not source then
+ return
+ end
local root = guide.getRoot(source)
noder.compileNodes(root)
local uri = guide.getUri(source)