summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-05 16:54:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-05 16:54:10 +0800
commitcc0f8bcae6bd3a0820243145ef50e1e5bd9a54a1 (patch)
tree049b1f826c3fe7695b757351c137567729182fdf
parent7dcb51aec5b098455d59943214ff6c5d81627dff (diff)
downloadlua-language-server-cc0f8bcae6bd3a0820243145ef50e1e5bd9a54a1.zip
fix
-rw-r--r--script/core/searcher.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 55fdf935..db4e0ab0 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -335,7 +335,7 @@ end)
local nodersMapMT = {__index = function (self, uri)
local noders = getNodersByUri(uri)
- self[uri] = noders
+ self[uri] = noders or false
return noders
end}
@@ -425,6 +425,9 @@ function m.searchRefsByID(status, suri, expect, mode)
if not id then
return
end
+ if not nodersMap[uri] then
+ return
+ end
if field then
id = id .. field
end