stylesheets/_scope.scss in bem-constructor-0.3.2 vs stylesheets/_scope.scss in bem-constructor-0.4.0

- old
+ new

@@ -15,13 +15,16 @@ @function _scope($scope) { // Log new block $new-scope: _bem-log-scope($scope); - // Check it's not called inside another scope - // and it's called at the root-level - $recursive-check: should-not-be-called-recursively('scope'); - $outside-check: should-not-be-called-within('block'); + // Error checks + $outside-check: _should-not-be-called-within('block', 'scope'); + + // Return false in case error throwing is disabled + @if $outside-check == false { + @return false; + } $namespace: if($bem-use-namespaces, $bem-scope-namespace + '-', ''); $selector: '.' + $namespace + $scope; $set-current: set-current-context('scope', $scope, $selector);