Skip to content

Commit 831f3ac

Browse files
committed
Added check for if to_number returns a string.
1 parent 4ebd1d4 commit 831f3ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/misc.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ function Cryptid.pluralize(str, vars)
184184
table.insert(_table, v)
185185
end
186186
local num = vars[tonumber(string.match(str, ">(%d+)"))] -- gets reference variable
187+
if type(num) == 'string' then num = (Big and to_number(to_big(num))) or num end
187188
local plural = _table[1] -- default
188189
local checks = { [1] = "=" } -- checks 1 by default
189190
local checks1mod = false -- tracks if 1 was modified

0 commit comments

Comments
 (0)