gearheads
/
mastodon
Archived
2
0
Fork 0

Fix #203 - try/catch around JSON parse

gh/stable
Eugen Rochko 2016-12-11 23:18:41 +01:00
parent 2b22c33039
commit f92cb02b9b
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}
}] }]
}); });