fix check boolean
This commit is contained in:
1 parent
e4cfab885a
commit
6ae27c50a0
3 files changed
+117
-242
No files matched your search
Generated
+113
-239
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "behavior3editor",
|
||||
"version": "1.8.8",
|
||||
"version": "1.8.9",
|
||||
"main": "dist-electron/main/index.js",
|
||||
"description": "行为树编辑器",
|
||||
"author": "zhandouxiaojiji & codetypes",
|
||||
|
||||
+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