gh-15363: Fix boost font shuffle off-by-one index (gh-15365)

This commit is contained in:
doruk 2026-09-11 15:35:24 +03:00 committed by GitHub
parent cb6a607c67
commit 22961e97d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1521,7 +1521,7 @@ ${cssSelector} {
shuffleBoost() {
const availFonts = this.fetchFontList();
const commonFonts = this.commonFonts;
let font = commonFonts[Math.round(Math.random() * commonFonts.length)];
let font = commonFonts[Math.floor(Math.random() * commonFonts.length)];
if (availFonts.includes(font)) {
this.currentBoostData.fontFamily = font;
}