We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b29e27d commit e5421e6Copy full SHA for e5421e6
src/operators.cpp
@@ -127,15 +127,15 @@ namespace Sass {
127
double lval = lhs.value();
128
double rval = rhs.value();
129
130
+ if (op == Sass_OP::MOD && rval == 0) {
131
+ return SASS_MEMORY_NEW(String_Quoted, pstate, "NaN");
132
+ }
133
+
134
if (op == Sass_OP::DIV && rval == 0) {
135
std::string result(lval ? "Infinity" : "NaN");
136
return SASS_MEMORY_NEW(String_Quoted, pstate, result);
137
}
138
- if (op == Sass_OP::MOD && rval == 0) {
- throw Exception::ZeroDivisionError(lhs, rhs);
- }
-
139
size_t l_n_units = lhs.numerators.size();
140
size_t l_d_units = lhs.numerators.size();
141
size_t r_n_units = rhs.denominators.size();
0 commit comments