fix check boolean
This commit is contained in:
1 parent
e4cfab885a
commit
6ae27c50a0
3 files changed
+117
-242
No files matched your search
+3
-2
@@ -252,8 +252,9 @@ export const checkNodeArgValue = (
|
||||
hasError = true;
|
||||
}
|
||||
} else if (isBoolType(type)) {
|
||||
const isBool = typeof value === "boolean" || value === undefined;
|
||||
if (!isBool) {
|
||||
const isBool = typeof value === "boolean";
|
||||
const isOptional = value === undefined && isNodeArgOptional(arg);
|
||||
if (!(isBool || isOptional)) {
|
||||
error(`'${arg.name}=${JSON.stringify(value)}' is not a boolean`);
|
||||
hasError = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user