[Bug] Fractional height values are not rounded in resolveDimensions

Fechada
#313 2 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@anurag2787 já está trabalhando nisso.

Desde 29/10/2026.

  • #316 de @anurag2787 — integrado

Avaliação

Esta issue ainda não foi avaliada.

Descrição

bug hacktoberfest

Describe the bug
The resolveDimensions function rounds the width to an integer but doesn't round the height. Passing a fractional height can result in non-integer image dimensions being returned.

To Reproduce
Steps to reproduce the behavior:

  1. Run npm run dev
  2. Send the following request: curl -i "http://localhost:4321/api/og?template=blog-minimal-dark&height=315.6"
  3. The API returns 200 OK, but the height is not rounded internally

Expected behavior
Both width and height should be rounded to the nearest integer before validation and being returned.

Actual behavior
The function can return a fractional height, such as 315.6, instead of an integer pixel value

Linguagem predominante
TypeScript
Estrelas
8
Forks
4
Merge médio
8h 47min
PRs com merge (30d)
157

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de codercops/ogcops

Todas as issues de codercops/ogcops

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.