Skip to content

Commit 309deb8

Browse files
fix: accept font MIME types with charset (#156)
Fixes #155
1 parent dde6822 commit 309deb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/inline.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ async function inlineCssFontUrlArgumentNode(
118118
!blob.type.startsWith('font/') &&
119119
!blob.type.startsWith('application/font-') &&
120120
!blob.type.startsWith('application/x-font-') &&
121-
blob.type !== 'application/vnd.ms-fontobject'
121+
!blob.type.startsWith('image/svg+xml') &&
122+
!blob.type.startsWith('application/vnd.ms-fontobject')
122123
) {
123124
throw new Error(
124125
`Invalid response MIME type inlining font at ${url.href}: Expected font MIME type, got ${blob.type}`

0 commit comments

Comments
 (0)