Fix bug in RecursiveStatementVisitor (#596)

The value of an `AtRule` can be null, so it should not be visited in that case.

Ran across this issue when I attempted to run the module migrator on a stylesheet containing `@font-face` (which has children, but no value).
This commit is contained in:
Jennifer Thakar 2019-02-15 21:53:17 +00:00 committed by Natalie Weizenbaum
parent 4c7b6cc0e5
commit b22ae51955

View File

@ -29,7 +29,7 @@ abstract class RecursiveStatementVisitor<T> implements StatementVisitor<T> {
T visitAtRule(AtRule node) {
visitInterpolation(node.name);
visitInterpolation(node.value);
if (node.value != null) visitInterpolation(node.value);
return node.children == null ? null : visitChildren(node);
}