isJSONContentType returns false for null/undefined
This commit is contained in:
@@ -9,7 +9,7 @@ export const knownContentTypes = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export function isJSONContentType(contentType) {
|
export function isJSONContentType(contentType) {
|
||||||
if (contentType.includes(";")) {
|
if (contentType && contentType.includes(";")) {
|
||||||
const [justContentType] = contentType.split(";")
|
const [justContentType] = contentType.split(";")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user