Fix compare with string variable
This commit is contained in:
1 parent
dae8f81d25
commit
0df12f4154
4 files changed
+3
-4
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "behavior3editor",
|
"name": "behavior3editor",
|
||||||
"version": "1.8.10",
|
"version": "1.8.11",
|
||||||
"main": "dist-electron/main/index.js",
|
"main": "dist-electron/main/index.js",
|
||||||
"description": "行为树编辑器",
|
"description": "行为树编辑器",
|
||||||
"author": "zhandouxiaojiji & codetypes",
|
"author": "zhandouxiaojiji & codetypes",
|
||||||
|
|||||||
+1
-1
Submodule src/behavior3 updated: 16334eab4c...7bc20e0313.
@@ -533,7 +533,6 @@ const validateArg = (
|
|||||||
return Promise.reject(new Error(i18n.t("node.invalidExpression")));
|
return Promise.reject(new Error(i18n.t("node.invalidExpression")));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
|
||||||
return Promise.reject(new Error(i18n.t("node.invalidExpression")));
|
return Promise.reject(new Error(i18n.t("node.invalidExpression")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ export const parseExpr = (expr: string) => {
|
|||||||
return parsedExprs[expr];
|
return parsedExprs[expr];
|
||||||
}
|
}
|
||||||
const result = expr
|
const result = expr
|
||||||
.split(/[^a-zA-Z0-9_.]/)
|
.split(/[^a-zA-Z0-9_.'"]/)
|
||||||
.map((v) => v.split(".")[0])
|
.map((v) => v.split(".")[0])
|
||||||
.filter((v) => isValidVariableName(v));
|
.filter((v) => isValidVariableName(v));
|
||||||
parsedExprs[expr] = result;
|
parsedExprs[expr] = result;
|
||||||
|
|||||||
Reference in new issue
Block a user