Fix a crash with nested media rules (#454)

Closes #453
This commit is contained in:
Natalie Weizenbaum 2018-08-17 12:34:31 -07:00 committed by GitHub
parent c5dff3e841
commit 677d781c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
## 1.12.1
* Don't crash when a media rule contains another media rule followed by a style
rule.
## 1.12.0
### Dart API

View File

@ -1012,7 +1012,7 @@ class _EvaluateVisitor
scopeWhen: node.hasDeclarations);
_atRootExcludingStyleRule = oldAtRootExcludingStyleRule;
if (!_inStyleRule) {
if (!_inStyleRule && _parent.children.isNotEmpty) {
var lastChild = _parent.children.last;
lastChild.isGroupEnd = true;
}

View File

@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_evaluate.dart.
// See tool/synchronize.dart for details.
//
// Checksum: 79bb19171b8f5f162f86e3892eddae2c2dad5fbb
// Checksum: 2bf89d853d3acfa3d7215dc7a6d43aefe0397519
import 'async_evaluate.dart' show EvaluateResult;
export 'async_evaluate.dart' show EvaluateResult;
@ -1005,7 +1005,7 @@ class _EvaluateVisitor
scopeWhen: node.hasDeclarations);
_atRootExcludingStyleRule = oldAtRootExcludingStyleRule;
if (!_inStyleRule) {
if (!_inStyleRule && _parent.children.isNotEmpty) {
var lastChild = _parent.children.last;
lastChild.isGroupEnd = true;
}

View File

@ -1,5 +1,5 @@
name: sass
version: 1.12.0
version: 1.12.1-dev
description: A Sass implementation in Dart.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/sass/dart-sass