ignore initializerless variable declaration when trying to inline single use variables - fixes #1516
This commit is contained in:
parent
2a0bcfd086
commit
2c8437ae92
@ -31,10 +31,10 @@ export function ReferencedIdentifier(node, parent, scope) {
|
||||
if (t.isVariableDeclarator(replacement)) {
|
||||
replacement = replacement.init;
|
||||
}
|
||||
if (!replacement) return;
|
||||
|
||||
t.toExpression(replacement);
|
||||
|
||||
scope.removeBinding(node.name);
|
||||
|
||||
binding.path.remove();
|
||||
return replacement;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user