stylesheets/_hack.scss in bem-constructor-0.3.0 vs stylesheets/_hack.scss in bem-constructor-0.3.2
- old
+ new
@@ -8,10 +8,13 @@
/// Find the last simple selector in a selector
@function _last-simple-selector($selector) {
$parsed: selector-parse($selector);
@if length($parsed) > 1 {
- @error '`#{$selector}` contains #{length($parsed)} selectors and the `_last-simple-selector()`function accepts only 1.';
+ @if $bem-throw-errors {
+ @error '`#{$selector}` contains #{length($parsed)} selectors and the `_last-simple-selector()`function accepts only 1.';
+ }
+ @return false;
}
$last-simple-selector: nth(nth($parsed, 1), -1);
@return $last-simple-selector;
}