Skip to content

Commit

Permalink
fix float number rounding issue when rendering images in less #515
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Aug 24, 2019
1 parent deab95e commit b020313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/less.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
img.onload = function() {
var height, width;
if (settings.width < img.width) {
height = (img.height * settings.width) / img.width;
height = Math.floor((img.height * settings.width) / img.width);
width = settings.width;
} else {
height = img.height;
Expand Down

0 comments on commit b020313

Please sign in to comment.