mirror of
https://github.com/marko-js/marko.git
synced 2026-01-25 15:03:04 +00:00
fix: remove empty const/let/var declarations caused by removal of MARKO_DEBUG expressions
This commit is contained in:
parent
c01205480a
commit
086533ead4
@ -67,6 +67,10 @@ function replaceMarkoDebug(path, test, consequent, alternate) {
|
||||
path.replaceWith(alternate);
|
||||
}
|
||||
} else {
|
||||
path.remove();
|
||||
if (path.parentPath.node.type === "VariableDeclarator") {
|
||||
path.parentPath.remove();
|
||||
} else {
|
||||
path.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user