1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-14 20:20:30 +00:00

Turn a nil to a string

Makes a `nil` a string inside of an expect in `define`, allowing `nil` to be passed.
This commit is contained in:
SkyTheCodeMaster 2021-07-04 20:54:55 -04:00 committed by Jonathan Coates
parent c2316ef256
commit d4efacd40a
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -42,7 +42,7 @@ for _, v in ipairs(valid_types) do valid_types[v] = true end
-- will error. -- will error.
function define(name, options) function define(name, options)
expect(1, name, "string") expect(1, name, "string")
expect(2, options, "table", nil) expect(2, options, "table", "nil")
if options then if options then
options = { options = {