Skip to content

Commit

Permalink
refs #548 - treat 0 as a special unitless number
Browse files Browse the repository at this point in the history
  • Loading branch information
robocoder committed Jun 20, 2018
1 parent 4963903 commit 3d3fd50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compiler.php
Expand Up @@ -4856,7 +4856,7 @@ protected function getNormalizedNumbers($args)
if (null === $unit) {
$unit = $number[2];
$originalUnit = $item->unitStr();
} elseif ($unit !== $number[2]) {
} elseif ($number[1] && $unit !== $number[2]) {
$this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr());
break;
}
Expand Down

0 comments on commit 3d3fd50

Please sign in to comment.