Fixed reusing node in destructuring plugin, which caused caching issue in helper-module-transforms (#6374)

This commit is contained in:
Mateusz Burzyński
2017-10-03 21:25:41 +02:00
committed by Henry Zhu
parent 91cde0148d
commit 68182bd69f
4 changed files with 13 additions and 1 deletions

View File

@@ -211,7 +211,7 @@ export default function({ types: t }) {
if (t.isRestElement(prop)) {
this.pushObjectRest(pattern, objRef, prop, i);
} else {
this.pushObjectProperty(prop, objRef);
this.pushObjectProperty(prop, t.clone(objRef));
}
}
}