Fix a unit division bug

This commit is contained in:
Natalie Weizenbaum 2018-01-23 12:51:33 -08:00
parent 921e1fa204
commit 9240f372aa
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,9 @@
* Fix a bug where multiplication like `(1/1px) * (1px/1)` wouldn't properly
cancel out units.
* Fix a bug where dividing by a compatible unit would produce an invalid
result.
### Dart API
* Add a `functions` parameter to `compile()`, `compleString()`,

View File

@ -444,7 +444,7 @@ class SassNumber extends Value implements ext.SassNumber {
removeFirstWhere<String>(mutableDenominators1, (denominator) {
var factor = _conversionFactor(numerator, denominator);
if (factor == null) return false;
value *= factor;
value /= factor;
return true;
}, orElse: () {
newNumerators.add(numerator);