summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-18 14:35:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-18 14:35:37 +0800
commit8d8c4359a855b02e663f8122fee8de34b06a9fd0 (patch)
tree9811147b439e0bd8fcb4e08f4f6a69a7476c5c6e /script/provider
parente713e3f7f9d88ea4683b74749bed6e26fe222288 (diff)
downloadlua-language-server-8d8c4359a855b02e663f8122fee8de34b06a9fd0.zip
fix runtime errors
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/markdown.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/provider/markdown.lua b/script/provider/markdown.lua
index a8adbbef..c5765571 100644
--- a/script/provider/markdown.lua
+++ b/script/provider/markdown.lua
@@ -17,7 +17,11 @@ local function checkSplitLine(self)
end
function mt:add(language, text)
- if not text or #text == 0 then
+ if not text then
+ return
+ end
+ text = tostring(text)
+ if #text == 0 then
return
end