check if accept type in content type string (#589)

This commit is contained in:
Charlotte Weaver
2019-02-08 09:41:24 -08:00
committed by GitHub
parent 6f464f4f92
commit 585a5808b9
+1 -1
View File
@@ -35,7 +35,7 @@ const doFetch = async (url, acceptType) => {
Accept: acceptType
})
});
if (res.ok && res.headers.get("Content-Type") === acceptType) {
if (res.ok && res.headers.get("Content-Type").includes(acceptType)) {
return res;
}
// else an error