redux-crud-store
redux-crud-store copied to clipboard
Fix: 204 No Content bug
Fix of "Unexpected end of JSON input" when HTTP response is 204 No Content
for example, someone might be manually checking the text() value of the response if the status is 204 (this is something I've done before). That would then fail if we pushed this change
How about something more like
// fix of "Unexpected end of JSON input" when HTTP response is 204 No Content
if (response.status === 204) {
return {
...response,
[format]: () => null,
};
}
This way we're not losing any methods
@dzwiedziu-nkg have you gotten a chance to look at this PR again?