diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-11 13:06:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-11 13:06:00 +0800 |
commit | 1a81302b66a5bef55342ef4d8b3fa0cb1de92e4e (patch) | |
tree | 8af6cf679f380b5d72da8e8e91383c98bb542789 /script-beta/core | |
parent | 9be2ea0586a775bea6d7c0b13472f0916d3016e6 (diff) | |
download | lua-language-server-1a81302b66a5bef55342ef4d8b3fa0cb1de92e4e.zip |
修正值为nil时的显示错误
Diffstat (limited to 'script-beta/core')
-rw-r--r-- | script-beta/core/hover/label.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/script-beta/core/hover/label.lua b/script-beta/core/hover/label.lua index 21330b17..e4081438 100644 --- a/script-beta/core/hover/label.lua +++ b/script-beta/core/hover/label.lua @@ -38,8 +38,11 @@ local function asValue(source, title) pack[#pack+1] = name .. ':' pack[#pack+1] = class or type if literal then - pack[#pack+1] = '=' - pack[#pack+1] = util.viewLiteral(literal) + local literalView = util.viewLiteral(literal) + if literalView then + pack[#pack+1] = '=' + pack[#pack+1] = util.viewLiteral(literal) + end end if cont then pack[#pack+1] = cont |