don't perform DCE on single references nested inside the binding initializer - fixes #1546
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user