isJSONContentType returns false for null/undefined
This commit is contained in:
parent
9fe10fd9a2
commit
f2b977c941
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ export const knownContentTypes = [
|
|||
]
|
||||
|
||||
export function isJSONContentType(contentType) {
|
||||
if (contentType.includes(";")) {
|
||||
if (contentType && contentType.includes(";")) {
|
||||
const [justContentType] = contentType.split(";")
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in a new issue