Cleanup object super traversal (#7681)
This commit is contained in:
parent
3f72f1d637
commit
637bfe76b1
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user