Skip to content

Commit

Permalink
Fix toString for namespaced variable (#1358)
Browse files Browse the repository at this point in the history
  • Loading branch information
jathak committed Jun 14, 2021
1 parent f1d36a1 commit a077094
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,9 @@
* Fix a couple bugs that could prevent some members from being found in certain
files that use a mix of imports and the module system.

* Fix incorrect recommendation for migrating division expressions that reference
namespaced variables.

## 1.34.1

* Fix a bug where `--update` would always compile any file that depends on a
Expand Down
7 changes: 1 addition & 6 deletions lib/src/ast/sass/expression/variable.dart
Expand Up @@ -23,10 +23,5 @@ class VariableExpression implements Expression {
T accept<T>(ExpressionVisitor<T> visitor) =>
visitor.visitVariableExpression(this);

String toString() {
var buffer = StringBuffer("\$");
if (namespace != null) buffer.write("$namespace.");
buffer.write(name);
return buffer.toString();
}
String toString() => namespace == null ? '\$$name' : '$namespace.\$$name';
}

0 comments on commit a077094

Please sign in to comment.