mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-02 03:29:04 +01:00
Fix #203 - try/catch around JSON parse
This commit is contained in:
parent
2b22c33039
commit
f92cb02b9b
1 changed files with 5 additions and 1 deletions
|
@ -17,6 +17,10 @@ export default getState => axios.create({
|
||||||
},
|
},
|
||||||
|
|
||||||
transformResponse: [function (data) {
|
transformResponse: [function (data) {
|
||||||
|
try {
|
||||||
return JSON.parse(data);
|
return JSON.parse(data);
|
||||||
|
} catch(Exception) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue