File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1737,7 +1737,12 @@ namespace Sass {
1737
1737
1738
1738
if (s->statement_type () == Statement::DIRECTIVE)
1739
1739
{
1740
- return expression ()->exclude (static_cast <Directive*>(s)->keyword ().erase (0 , 1 ));
1740
+ if (Directive* dir = dynamic_cast <Directive*>(s))
1741
+ {
1742
+ std::string keyword (dir->keyword ());
1743
+ if (keyword.length () > 0 ) keyword.erase (0 , 1 );
1744
+ return expression ()->exclude (keyword);
1745
+ }
1741
1746
}
1742
1747
if (s->statement_type () == Statement::MEDIA)
1743
1748
{
@@ -1751,9 +1756,9 @@ namespace Sass {
1751
1756
{
1752
1757
return expression ()->exclude (" supports" );
1753
1758
}
1754
- if (static_cast <Directive*>(s)-> is_keyframes ( ))
1759
+ if (Directive* dir = dynamic_cast <Directive*>(s))
1755
1760
{
1756
- return expression ()->exclude (" keyframes" );
1761
+ if (dir-> is_keyframes ()) return expression ()->exclude (" keyframes" );
1757
1762
}
1758
1763
return false ;
1759
1764
}
You can’t perform that action at this time.
0 commit comments