This commit is contained in:
parent
7b0cfbe0b4
commit
e28a21de79
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ export const fetchPost = (url: string, data?: any, cb?: (response: IWebSocketDat
|
|||
code: response.status,
|
||||
};
|
||||
} else {
|
||||
if (response.headers.get("content-type").indexOf("application/json") > -1) {
|
||||
if (response.headers.get("content-type")?.indexOf("application/json") > -1) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
|
|
Loading…
Add table
Reference in a new issue