Fix a @content bug.

This commit is contained in:
Natalie Weizenbaum 2017-02-04 12:39:23 -08:00
parent ac939f5bfe
commit 5e4d260c2a
2 changed files with 6 additions and 8 deletions

View File

@ -73,6 +73,8 @@
* Fix an `@extend` edge case involving multiple combinators in a row.
* Fix a bug where a `@content` block could get incorrectly passed to a mixin.
## 1.0.0-alpha.8
* Add the `content-exists()` function.

View File

@ -714,14 +714,10 @@ class _PerformVisitor
return null;
}
if (node.children == null) {
_runUserDefinedCallable(node.arguments, mixin, node.span, callback);
} else {
var environment = _environment.closure();
_runUserDefinedCallable(node.arguments, mixin, node.span, () {
_environment.withContent(node.children, environment, callback);
});
}
var environment = node.children == null ? null : _environment.closure();
_runUserDefinedCallable(node.arguments, mixin, node.span, () {
_environment.withContent(node.children, environment, callback);
});
return null;
}