Skip to content

Commit

Permalink
Merge pull request sass#970 from mgreter/bugfix/issue_943
Browse files Browse the repository at this point in the history
Refine illegal extend error across media-queries
  • Loading branch information
mgreter committed Mar 23, 2015
2 parents 3681c48 + 063bb9e commit 948854a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions extend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,9 +1679,11 @@ namespace Sass {
// check if both selectors have the same media block parent
if (ext.first->media_block() == pComplexSelector->media_block()) continue;
To_String to_string(&ctx);
if (ext.second->media_block() && ext.second->media_block()->media_queries() &&
pComplexSelector->media_block() && pComplexSelector->media_block()->media_queries())
{
if (ext.second->media_block() == 0) continue;
if (pComplexSelector->media_block() &&
ext.second->media_block()->media_queries() &&
pComplexSelector->media_block()->media_queries()
) {
string query_left(ext.second->media_block()->media_queries()->perform(&to_string));
string query_right(pComplexSelector->media_block()->media_queries()->perform(&to_string));
if (query_left == query_right) continue;
Expand Down

0 comments on commit 948854a

Please sign in to comment.