From 8d8c4359a855b02e663f8122fee8de34b06a9fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 18 Aug 2021 14:35:37 +0800 Subject: fix runtime errors --- script/provider/markdown.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'script/provider/markdown.lua') 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 -- cgit v1.2.3