Skip to content

Commit

Permalink
Simplify logic in getLengthNumeral (#7210)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandv authored and jridgewell committed Feb 27, 2017
1 parent 3dbce5e commit 7d6ec39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function getLengthUnits(length) {
*/
export function getLengthNumeral(length) {
const res = parseFloat(length);
return !isFiniteNumber(res) ? undefined : res;
return isFiniteNumber(res) ? res : undefined;
}


Expand Down

0 comments on commit 7d6ec39

Please sign in to comment.