You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inline conditional function of if(condition, then-value, else-value) has some unexpected behavior.
It tries to evaluate "else-value" even if condition is true and else-value in unneeded. In the same way, "then-value" is evaluated even if condition is false.
That may cause 'Operation on an invalid type' error if condition and value processing depends on value type.
.mymixin(@val) {
myprop: if(isnumber(@val), @val*42, @val);
}
a {
.mymixin(11); // works perfectly with the result of 462
}
b {
.mymixin(null); // causes 'Operation on an invalid type' error
}
The text was updated successfully, but these errors were encountered:
Inline conditional function of
if(condition, then-value, else-value)
has some unexpected behavior.It tries to evaluate "else-value" even if condition is true and else-value in unneeded. In the same way, "then-value" is evaluated even if condition is false.
That may cause 'Operation on an invalid type' error if condition and value processing depends on value type.
The text was updated successfully, but these errors were encountered: