Skip to content

Commit e591cd9

Browse files
add a trim to var name
1 parent 903e316 commit e591cd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/webgal/src/Core/controller/gamePlay/scriptExecutor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export const whenChecker = (whenValue: string | undefined): boolean => {
2121
// 先把变量解析出来
2222
const valExpArr = whenValue.split(/([+\-*\/()><!]|>=|<=|==|&&|\|\||!=)/g);
2323
const valExp = valExpArr
24-
.map((e) => {
24+
.map((_e) => {
25+
const e = _e.trim();
2526
if (e.match(/[a-zA-Z]/)) {
2627
if (e.match(/^(true|false)$/)) {
2728
return e;

0 commit comments

Comments
 (0)