summaryrefslogtreecommitdiff
path: root/script/core/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-28 19:34:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-28 19:34:56 +0800
commit8944c513f5d0d511f0bb4151bf3838b65b49be22 (patch)
treeeaa1781de9c0ca357388c61bde6bb4bc1fe35c22 /script/core/diagnostics
parent06a7228bc59045809568f2bb33a803864e08c566 (diff)
downloadlua-language-server-8944c513f5d0d511f0bb4151bf3838b65b49be22.zip
fix runtime error
Diffstat (limited to 'script/core/diagnostics')
-rw-r--r--script/core/diagnostics/duplicate-doc-alias.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/core/diagnostics/duplicate-doc-alias.lua b/script/core/diagnostics/duplicate-doc-alias.lua
index e9ee5aab..360358e4 100644
--- a/script/core/diagnostics/duplicate-doc-alias.lua
+++ b/script/core/diagnostics/duplicate-doc-alias.lua
@@ -41,8 +41,8 @@ return function (uri, callback)
end
if #cache[name] > 1 then
callback {
- start = doc.alias.start,
- finish = doc.alias.finish,
+ start = (doc.alias or doc.enum).start,
+ finish = (doc.alias or doc.enum).finish,
related = cache,
message = lang.script('DIAG_DUPLICATE_DOC_ALIAS', name)
}