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;
|
||||
}
|
||||
}
|
||||
} else if (t.isAssignmentExpression(parent)) {
|
||||
} else if (t.isAssignmentExpression(parent, { operator: "=" })) {
|
||||
// foo = function () {};
|
||||
id = parent.left;
|
||||
} else if (!id) {
|
||||
|
||||
@ -11,3 +11,5 @@ baz = 12;
|
||||
bar = function() {
|
||||
bar();
|
||||
};
|
||||
|
||||
qux += function() {}
|
||||
|
||||
@ -23,3 +23,5 @@ bar = function (_bar) {
|
||||
}(function () {
|
||||
bar();
|
||||
});
|
||||
|
||||
qux += function () {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user