make default parameters iife invocation less serious
This commit is contained in:
parent
0867df2691
commit
4c8e6481b6
@ -16,10 +16,12 @@ var hasDefaults = function (node) {
|
|||||||
|
|
||||||
var iifeVisitor = {
|
var iifeVisitor = {
|
||||||
enter: function (node, parent, scope, state) {
|
enter: function (node, parent, scope, state) {
|
||||||
if (t.isReferencedIdentifier(node, parent) && state.scope.hasOwnReference(node.name)) {
|
if (!t.isReferencedIdentifier(node, parent)) return;
|
||||||
state.iife = true;
|
if (!state.scope.hasOwnBinding(node.name)) return;
|
||||||
this.stop();
|
if (state.scope.bindingEquals(node.name, node)) return;
|
||||||
}
|
|
||||||
|
state.iife = true;
|
||||||
|
this.stop();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user