Skip to content

Commit

Permalink
Broader mimetype check
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Oct 11, 2024
1 parent f382af5 commit 9a66ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function fetchLinkedStylesheets(
try {
const response = await fetch(data.url.toString());
const type = response.headers.get('content-type');
if (type !== 'text/css') {
if (!type?.startsWith('text/css')) {
const error = new Error(
`Error loading ${data.url}: expected content-type "text/css", got "${type}".`,
);
Expand Down

0 comments on commit 9a66ad5

Please sign in to comment.