diff --git a/src/xml.tsx b/src/xml.tsx index cc334d72..ff9b02e0 100644 --- a/src/xml.tsx +++ b/src/xml.tsx @@ -122,7 +122,7 @@ export function SvgXml(props: XmlProps) { export async function fetchText(uri: string) { const response = await fetch(uri); - if (response.ok) { + if (response.ok || (response.status === 0 && uri.startsWith('file://'))) { return await response.text(); } throw new Error(`Fetching ${uri} failed with status ${response.status}`);