checkbox default val and radio type checks for set_value

This commit is contained in:
Mikayla Fischler
2023-10-01 17:06:24 -04:00
parent 02e9c09daf
commit b1446637ad
3 changed files with 4 additions and 3 deletions

View File

@@ -182,7 +182,7 @@ local function radio_2d_button(args)
-- set the value
---@param val integer new value
function e.set_value(val)
if val > 0 and val <= #args.options then
if type(val) == "number" and val > 0 and val <= #args.options then
e.value = val
e.redraw()
end