mirror of
https://github.com/NetEase/tango.git
synced 2026-08-29 02:01:34 +08:00
fix: parse tango variables in view file
This commit is contained in:
@@ -1262,7 +1262,12 @@ export function traverseViewFile(ast: t.File, idGenerator: IdGenerator) {
|
||||
|
||||
MemberExpression(path) {
|
||||
const variable = node2value(path.node, false);
|
||||
if (isTangoVariable(variable) && !variables.includes(variable)) {
|
||||
const parentNode = path.parentPath.node;
|
||||
if (
|
||||
!t.isMemberExpression(parentNode) &&
|
||||
isTangoVariable(variable) &&
|
||||
!variables.includes(variable)
|
||||
) {
|
||||
variables.push(variable);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user