Skip to content

Commit

Permalink
fix: add prefix in data:
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Feb 21, 2024
1 parent 38a44b1 commit 0a9bf59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function setupPublicAssetStrategy (options: ModuleOptions['assets'] = {})
const filename = event.path.slice(1)
const url = renderedFontURLs.get(event.path.slice(1))
if (!url) { throw createError({ statusCode: 404 }) }
const key = 'data:' + filename
const key = 'data:fonts:' + filename
// Use nitro.storage to cache the font data between requests
let res = await nitro.storage.getItemRaw(key)
if (!res) {
Expand Down Expand Up @@ -93,7 +93,7 @@ export function setupPublicAssetStrategy (options: ModuleOptions['assets'] = {})
await fsp.mkdir(cacheDir, { recursive: true })
logger.info('Downloading uncached fonts...')
for (const [filename, url] of renderedFontURLs) {
const key = 'data:' + filename
const key = 'data:fonts:' + filename
// Use nitro.storage to cache the font data between builds
let res = await nitro.storage.getItemRaw(key)
if (!res) {
Expand Down

0 comments on commit 0a9bf59

Please sign in to comment.