Skip to content

Commit

Permalink
Fix bug in RecursiveStatementVisitor (#596)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
jathak authored and nex3 committed Feb 15, 2019
1 parent 4c7b6cc commit b22ae51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/visitor/recursive_statement.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b22ae51

Please sign in to comment.