We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b87876 commit 45054bcCopy full SHA for 45054bc
1 file changed
src/stores/icon.ts
@@ -60,7 +60,11 @@ export const useIconStore = defineStore('icon', () => {
60
return;
61
}
62
63
- const data = URL.createObjectURL(await res.blob());
+ // Some SVGs have wrong MIME type, so we use Blob to force it.
64
+ const bytes = await res.arrayBuffer();
65
+ const blob = new Blob([bytes], { type: 'image/svg+xml' });
66
+
67
+ const data = URL.createObjectURL(blob);
68
fetched(name, data);
69
70
const img = await loadImage(data);
0 commit comments