File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -606,9 +606,9 @@ namespace Sass {
606
606
607
607
if ((s1 && s1->has_interpolants ()) || (s2 && s2->has_interpolants ()) || force_delay)
608
608
{
609
- // If possible upgrade LHS to a number
610
609
if (op_type == Sass_OP::DIV || op_type == Sass_OP::MUL || op_type == Sass_OP::MOD || op_type == Sass_OP::ADD || op_type == Sass_OP::SUB ||
611
610
op_type == Sass_OP::EQ) {
611
+ // If possible upgrade LHS to a number (for number to string compare)
612
612
if (String_Constant_Ptr str = SASS_MEMORY_CAST (String_Constant, lhs)) {
613
613
std::string value (str->value ());
614
614
const char * start = value.c_str ();
@@ -617,10 +617,11 @@ namespace Sass {
617
617
lhs = l->perform (this );
618
618
}
619
619
}
620
+ // If possible upgrade RHS to a number (for string to number compare)
620
621
if (String_Constant_Ptr str = SASS_MEMORY_CAST (String_Constant, rhs)) {
621
622
std::string value (str->value ());
622
623
const char * start = value.c_str ();
623
- if (Prelexer::sequence < Prelexer::number >(start) != 0 ) {
624
+ if (Prelexer::sequence < Prelexer::dimension, Prelexer:: number >(start) != 0 ) {
624
625
Textual_Obj r = SASS_MEMORY_NEW (Textual, b->pstate (), Textual::DIMENSION, str->value ());
625
626
rhs = r->perform (this );
626
627
}
You can’t perform that action at this time.
0 commit comments