mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-12 11:40:15 +05:00
gh-15363: Fix boost font shuffle off-by-one index (gh-15365)
This commit is contained in:
parent
cb6a607c67
commit
22961e97d8
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user