Skip to content

Commit a8b4e04

Browse files
committed
add nil check to pluralize
1 parent 81d7449 commit a8b4e04

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
@@ -187,6 +187,7 @@ function Cryptid.pluralize(str, vars)
187187
if type(num) == "string" then
188188
num = (Big and to_number(to_big(num))) or num
189189
end
190+
if not num then num = 1 end
190191
local plural = _table[1] -- default
191192
local checks = { [1] = "=" } -- checks 1 by default
192193
local checks1mod = false -- tracks if 1 was modified

0 commit comments

Comments
 (0)