From f2b977c9414e526a9c445379819d54724d3feedc Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Tue, 18 Aug 2020 14:13:20 -0400 Subject: [PATCH] isJSONContentType returns false for null/undefined --- helpers/utils/contenttypes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/utils/contenttypes.js b/helpers/utils/contenttypes.js index d9f1d817..efd94f72 100644 --- a/helpers/utils/contenttypes.js +++ b/helpers/utils/contenttypes.js @@ -9,7 +9,7 @@ export const knownContentTypes = [ ] export function isJSONContentType(contentType) { - if (contentType.includes(";")) { + if (contentType && contentType.includes(";")) { const [justContentType] = contentType.split(";") return (