Skip to content

Commit

Permalink
use original type if not numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 2, 2024
1 parent c6fa952 commit 1c2b1a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/control-panel/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function set_preference(data, in_value)
value = argparse.boolean(value)
end
if expected_type == "number" then
value = tonumber(value)
value = tonumber(value) or value
end
local actual_type = type(value)
if actual_type ~= expected_type then
Expand Down

0 comments on commit 1c2b1a0

Please sign in to comment.