-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
La valeur de retour de la fonction getIdealFontSize()
doit être de type numérique, à défaut 0 mais pas null
!
attestation-deplacement-derogatoire-covid-19/src/js/pdf-util.js
Lines 195 to 204 in 19cca14
function getIdealFontSize (font, text, maxWidth, minSize, defaultSize) { | |
let currentSize = defaultSize | |
let textWidth = font.widthOfTextAtSize(text, defaultSize) | |
while (textWidth > maxWidth && currentSize > minSize) { | |
textWidth = font.widthOfTextAtSize(text, --currentSize) | |
} | |
return textWidth > maxWidth ? null : currentSize | |
} |
Sinon la création du PDF est buggée et l'attestation n'est pas générée 🚫
« Uncaught (in promise) TypeError:
options.size
must be of typenumber
orn
, but was actually of typenull
».
Correctif proposé 👉 #19
Metadata
Metadata
Assignees
Labels
No labels