Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] Fractional height values are not rounded in resolveDimensions

Aperta
#313 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@anurag2787 ci sta già lavorando.

Dal 29/10/2026.

  • #316 di @anurag2787 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
TypeScript
Stelle
8
Fork
4
Merge medio
8h 19m
PR unite (30g)
129

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codercops/ogcops

Tutte le issue di codercops/ogcops

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.