From d4efacd40a9c7aa0af7799f823ae381ed910b1ae Mon Sep 17 00:00:00 2001 From: SkyTheCodeMaster <34724753+SkyTheCodeMaster@users.noreply.github.com> Date: Sun, 4 Jul 2021 20:54:55 -0400 Subject: [PATCH] Turn a nil to a string Makes a `nil` a string inside of an expect in `define`, allowing `nil` to be passed. --- src/main/resources/data/computercraft/lua/rom/apis/settings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/data/computercraft/lua/rom/apis/settings.lua b/src/main/resources/data/computercraft/lua/rom/apis/settings.lua index f86044128..1394dec1d 100644 --- a/src/main/resources/data/computercraft/lua/rom/apis/settings.lua +++ b/src/main/resources/data/computercraft/lua/rom/apis/settings.lua @@ -42,7 +42,7 @@ for _, v in ipairs(valid_types) do valid_types[v] = true end -- will error. function define(name, options) expect(1, name, "string") - expect(2, options, "table", nil) + expect(2, options, "table", "nil") if options then options = {