Cleanup object super traversal (#7681)

This commit is contained in:
Justin Ridgewell 2018-04-06 20:39:57 +01:00 committed by GitHub
parent 3f72f1d637
commit 637bfe76b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,12 +25,9 @@ export default declare(api => {
const getObjectRef = () =>
(objectRef = objectRef || path.scope.generateUidIdentifier("obj"));
path.get("properties").forEach(propertyPath => {
if (!propertyPath.isMethod()) return;
path.get("properties").forEach(propPath => {
if (!propPath.isMethod()) return;
const propPaths: Array = path.get("properties");
for (let propPath of propPaths) {
if (propPath.isObjectProperty()) propPath = propPath.get("value");
replacePropertySuper(
propPath,
propPath.node,
@ -38,7 +35,6 @@ export default declare(api => {
getObjectRef,
state,
);
}
});
if (objectRef) {