Skip to content

Commit

Permalink
Refine illegal extend error across media-queries
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Mar 14, 2015
1 parent dea27e5 commit 063bb9e
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 063bb9e

Please sign in to comment.