Skip to content

Commit 181601a

Browse files
authored
update content type logic to check if header includes image/gif rather than strictly checking for image/gif (#14)
update package.json to match react-gifs/tools name remove yarn.lock Co-authored-by: bluematter <[email protected]>
1 parent be14c4f commit 181601a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parse-generate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const validateAndFix = (gif) => {
1515
export const parse = (src, { signal }) =>
1616
fetch(src, { signal })
1717
.then((resp) => {
18-
if (resp.headers.get("Content-Type") !== "image/gif")
18+
if (!resp.headers.get("Content-Type").includes("image/gif"))
1919
throw Error(
2020
`Wrong content type: "${resp.headers.get("Content-Type")}"`
2121
);

0 commit comments

Comments
 (0)