check for nested id
This commit is contained in:
@@ -65,8 +65,12 @@ export function push(mutatorMap: Object, node: Object, kind: string, file, scope
|
||||
value = nameFunction({ id: key, node: value, scope });
|
||||
|
||||
// Class methods don't have their name bound in the funciton body.
|
||||
if (t.isClassMethod(node) && value.id) {
|
||||
value.id[t.NOT_LOCAL_BINDING] = true;
|
||||
if (t.isClassMethod(node)) {
|
||||
if (value.id) {
|
||||
value.id[t.NOT_LOCAL_BINDING] = true;
|
||||
} else if (t.isCallExpression(value) && t.isFunctionExpression(value.callee) && value.callee.id) {
|
||||
value.callee.id[t.NOT_LOCAL_BINDING] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user