修复测试用例问题

This commit is contained in:
2betop 2022-06-16 14:58:19 +08:00
parent 915ce9dd77
commit f24e5c09c5
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ export function isPureVariable(path?: any): path is string {
try {
const ast = parse(path);
// 只有一个成员说明是纯表达式模式
return ast.body.length === 1;
return ast.body.length === 1 && ast.body[0].type === 'script';
} catch (err) {
return false;
}

View File

@ -9,6 +9,6 @@
"../../node_modules/@types"
]
},
"include": ["src/**/*"],
"include": ["src/**/*", "../amis-ui/src/custom.d.ts"],
"references": [{"path": "../amis-core"}, {"path": "../amis-ui"}]
}