[READ-ONLY] a fast, modern browser for the npm registry

chore: don't warn for unmocked `data:` URLs (#1224)

authored by philippeserhal.com and committed by

GitHub 091e7e49 8fc9197c

+7 -2
+7 -2
modules/runtime/server/cache.ts
··· 710 710 const originalFetch = globalThis.fetch 711 711 const original$fetch = globalThis.$fetch 712 712 713 - // Override native fetch for esm.sh requests 713 + // Override native fetch for esm.sh requests and to inject test fixture responses 714 714 globalThis.fetch = async (input: URL | RequestInfo, init?: RequestInit): Promise<Response> => { 715 715 const urlStr = 716 716 typeof input === 'string' ? input : input instanceof URL ? input.toString() : input.url 717 717 718 - if (urlStr.startsWith('/') || urlStr.includes('woff') || urlStr.includes('fonts')) { 718 + if ( 719 + urlStr.startsWith('/') || 720 + urlStr.startsWith('data:') || 721 + urlStr.includes('woff') || 722 + urlStr.includes('fonts') 723 + ) { 719 724 return await originalFetch(input, init) 720 725 } 721 726