diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-08 17:26:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-08 17:26:18 +0800 |
commit | 7c29a6012bf5fe2cc1ff79598f8be6f80528e767 (patch) | |
tree | 6afee29f52c8862bfe7d6e780022bfb6d4ecabd5 /script/core/hover/name.lua | |
parent | 4c71c56f925246618cce854ab9773311a7812055 (diff) | |
download | lua-language-server-7c29a6012bf5fe2cc1ff79598f8be6f80528e767.zip |
cleanup
Diffstat (limited to 'script/core/hover/name.lua')
-rw-r--r-- | script/core/hover/name.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua index 1e1f733e..3fabfb89 100644 --- a/script/core/hover/name.lua +++ b/script/core/hover/name.lua @@ -50,14 +50,12 @@ end local function asDocFunction(source, oop) local doc = guide.getParentType(source, 'doc.type') or guide.getParentType(source, 'doc.overload') - if not doc or not doc.bindSources then + if not doc or not doc.bindSource then return '' end - for _, src in ipairs(doc.bindSources) do - local name = buildName(src, oop) - if name ~= '' then - return name - end + local name = buildName(doc.bindSource, oop) + if name ~= '' then + return name end return '' end |