fix allowPartial in t.buildMatchMemberExpression
This commit is contained in:
parent
47b803ef24
commit
ac098255be
@ -423,6 +423,10 @@ t.buildMatchMemberExpression = function (match, allowPartial) {
|
||||
while (search.length) {
|
||||
var node = search.shift();
|
||||
|
||||
if (allowPartial && i === parts.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (t.isIdentifier(node)) {
|
||||
// this part doesn't match
|
||||
if (parts[i] !== node.name) return false;
|
||||
@ -444,8 +448,8 @@ t.buildMatchMemberExpression = function (match, allowPartial) {
|
||||
}
|
||||
|
||||
// too many parts
|
||||
if (++i >= parts.length) {
|
||||
return !!allowPartial;
|
||||
if (++i > parts.length) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user