fix commands boolean type support

This commit is contained in:
MihailRis 2024-11-06 17:29:50 +03:00
parent 8e00e73b8e
commit a50cb109c8

View File

@ -252,7 +252,7 @@ public:
case ArgType::integer:
return typeCheck(arg, dv::value_type::integer, value, "integer");
case ArgType::boolean:
if (!arg->optional) {
if (!arg->optional && !value.isBoolean()) {
throw typeError(arg->name, "boolean", value);
}
return value.isBoolean();