don't perform DCE on single references nested inside the binding initializer - fixes #1546

This commit is contained in:
Sebastian McKenzie
2015-05-15 18:48:05 +01:00
parent ff12046009
commit 30e3908484

View File

@@ -33,6 +33,10 @@ export function ReferencedIdentifier(node, parent, scope) {
}
if (!replacement) return;
if (this.findParent((node) => replacement)) {
return;
}
t.toExpression(replacement);
scope.removeBinding(node.name);
binding.path.remove();