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:
parent
c2316ef256
commit
d4efacd40a
@ -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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user