From 585a5808b9d082015c91e52e50a1c1121abe1520 Mon Sep 17 00:00:00 2001 From: Charlotte Weaver Date: Fri, 8 Feb 2019 09:41:24 -0800 Subject: [PATCH] check if accept type in content type string (#589) --- client/src/util/actionHelpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/util/actionHelpers.js b/client/src/util/actionHelpers.js index 8c38bf97..c7e23267 100644 --- a/client/src/util/actionHelpers.js +++ b/client/src/util/actionHelpers.js @@ -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