diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-08-23 17:07:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-08-23 17:07:24 +0800 |
commit | 66b68f8453d98dbb3197926e0ad96764a4513ca2 (patch) | |
tree | fb88fef20b52adf114627ffae52873514b906ec3 /script | |
parent | ee20f068952aa4586e2976234aafd68d27190ec2 (diff) | |
download | lua-language-server-66b68f8453d98dbb3197926e0ad96764a4513ca2.zip |
only check one result
Diffstat (limited to 'script')
-rw-r--r-- | script/core/diagnostics/different-requires.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/core/diagnostics/different-requires.lua b/script/core/diagnostics/different-requires.lua index 5b86d8de..909342f4 100644 --- a/script/core/diagnostics/different-requires.lua +++ b/script/core/diagnostics/different-requires.lua @@ -22,10 +22,10 @@ return function (uri, callback) end local literal = arg1[1] local results = ws.findUrisByRequirePath(literal) - local result = results and results[1] - if not result then + if not results or #results ~= 1 then return end + local result = results[1] if not files.isLua(result) then return end |