fix: don’t add function name when operator is not = (#11361)
This commit is contained in:
parent
94447135c7
commit
c3042cfd27
@ -179,7 +179,7 @@ export default function({ node, parent, scope, id }, localBinding = false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (t.isAssignmentExpression(parent)) {
|
} else if (t.isAssignmentExpression(parent, { operator: "=" })) {
|
||||||
// foo = function () {};
|
// foo = function () {};
|
||||||
id = parent.left;
|
id = parent.left;
|
||||||
} else if (!id) {
|
} else if (!id) {
|
||||||
|
|||||||
@ -11,3 +11,5 @@ baz = 12;
|
|||||||
bar = function() {
|
bar = function() {
|
||||||
bar();
|
bar();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
qux += function() {}
|
||||||
|
|||||||
@ -23,3 +23,5 @@ bar = function (_bar) {
|
|||||||
}(function () {
|
}(function () {
|
||||||
bar();
|
bar();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
qux += function () {};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user