Skip to content

Commit 3a8f838

Browse files
author
Rishi Raj Jain
committed
ensure better randomness
1 parent b7d3517 commit 3a8f838

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/astro-font/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export async function createBaseCSS(fontCollection: Config): Promise<string[]> {
324324
export async function createFontCSS(fontCollection: Config): Promise<string> {
325325
const collection = []
326326
const fallbackFont = await getFallbackFont(fontCollection)
327-
const fallbackName = `'${fontCollection.fallbackName || '_font_fallback_' + new Date().getTime()}'`
327+
const fallbackName = `'${fontCollection.fallbackName || '_font_fallback_' + Math.floor(Math.random() * Date.now())}'`
328328
if (fontCollection.selector) {
329329
collection.push(fontCollection.selector)
330330
collection.push(`{`)

0 commit comments

Comments
 (0)