We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1436903 commit 3a7184dCopy full SHA for 3a7184d
1 file changed
packages/start/src/directives/remove-unused-variables.ts
@@ -24,8 +24,8 @@ export function removeUnusedVariables(program: babel.NodePath<t.Program>) {
24
case "hoisted":
25
case "module":
26
if (binding.references === 0 && !binding.path.removed) {
27
- if (isPathValid(path.parentPath, t.isImportDeclaration)) {
28
- const parent = path.parentPath;
+ if (isPathValid(binding.path.parentPath, t.isImportDeclaration)) {
+ const parent = binding.path.parentPath;
29
if (parent.node.specifiers.length === 1) {
30
parent.remove();
31
} else {
0 commit comments