Skip to content

Commit 2915722

Browse files
committed
pluralize fixes
1 parent a55e066 commit 2915722

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/misc.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ function Cryptid.pluralize(str, vars)
220220
table.sort(keys, function(a, b)
221221
return a < b
222222
end)
223+
if not (tonumber(num) or is_number(num)) then
224+
num = 1
225+
end
223226
for _, k in ipairs(keys) do
224227
if fch(checks[k], "=") then
225228
if to_big(math.abs(num - k)) < to_big(0.001) then

0 commit comments

Comments
 (0)