From cfbf36436c7a40365c5ab37e5da141616b67e9ca Mon Sep 17 00:00:00 2001 From: mirtlecn Date: Thu, 25 Apr 2024 20:53:39 +0800 Subject: [PATCH] fix(lua): #832 --- lua/number_translator.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/number_translator.lua b/lua/number_translator.lua index 1a8a82f..3f390fc 100644 --- a/lua/number_translator.lua +++ b/lua/number_translator.lua @@ -145,7 +145,7 @@ local function number_translator(input, seg, env) if env.number_keyword ~= '' and input:sub(1, 1) == env.number_keyword then str = string.gsub(input, "^(%a+)", "") numberPart = number_translatorFunc(str) - if #numberPart > 0 then + if str and #str > 0 and #numberPart > 0 then for i = 1, #numberPart do yield(Candidate(input, seg.start, seg._end, numberPart[i][1], numberPart[i][2])) end