Skip to content

Commit

Permalink
fix: use Math.round for generated width
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 16, 2021
1 parent 33dbc54 commit 8ee9a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function getSizes (ctx: ImageCTX, input: string, opts: ImageSizesOptions) {
continue
}
if (isFluid) {
width = (width / 100) * screenMaxWidth
width = Math.round((width / 100) * screenMaxWidth)
}
const height = ratio ? Math.round(width * ratio) : parseSize(opts.modifiers.height)
variants.push({
Expand Down

0 comments on commit 8ee9a40

Please sign in to comment.