fix matchesPattern with deep member expressions
This commit is contained in:
parent
59820b9a84
commit
80d362c534
@ -40,8 +40,8 @@ export function matchesPattern(pattern: string, allowPartial?: boolean): boolean
|
||||
// we can't deal with this
|
||||
return false;
|
||||
} else {
|
||||
search.push(node.object);
|
||||
search.push(node.property);
|
||||
search.unshift(node.property);
|
||||
search.unshift(node.object);
|
||||
continue;
|
||||
}
|
||||
} else if (t.isThisExpression(node)) {
|
||||
@ -57,7 +57,7 @@ export function matchesPattern(pattern: string, allowPartial?: boolean): boolean
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return i === parts.length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user