Skip to content

Commit

Permalink
fix: accept font MIME types with charset (#156)
Browse files Browse the repository at this point in the history
Fixes #155
  • Loading branch information
MartinGerritsen authored Jun 29, 2021
1 parent dde6822 commit 309deb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ async function inlineCssFontUrlArgumentNode(
!blob.type.startsWith('font/') &&
!blob.type.startsWith('application/font-') &&
!blob.type.startsWith('application/x-font-') &&
blob.type !== 'application/vnd.ms-fontobject'
!blob.type.startsWith('image/svg+xml') &&
!blob.type.startsWith('application/vnd.ms-fontobject')
) {
throw new Error(
`Invalid response MIME type inlining font at ${url.href}: Expected font MIME type, got ${blob.type}`
Expand Down

0 comments on commit 309deb8

Please sign in to comment.