update wikipedia widget

This commit is contained in:
Evgeny
2021-08-11 14:37:37 +03:00
parent bf0d9a5f4f
commit 78afb6e1b0

View File

@@ -44,7 +44,7 @@ end
function string:smart_sub(max) function string:smart_sub(max)
local pos1, pos2 = self:find("%.", max-50) local pos1, pos2 = self:find("%.", max-50)
if pos1 < max+50 then if pos1 ~= nil and pos1 < max+50 then
return self:sub(1, pos1+1) return self:sub(1, pos1+1)
else else
return self:sub(1, max) return self:sub(1, max)