We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 876e056 commit 23bad72Copy full SHA for 23bad72
lib/jsonApiClient.js
@@ -9,7 +9,11 @@ import qs from 'qs';
9
10
// Add a response interceptor to format response with jsonapi-parse
11
axios.interceptors.response.use(response => {
12
- return jsonapiParse.parse(response.data).data;
+ const parsedResponse = jsonapiParse.parse(response.data);
13
+ if (parsedResponse === undefined) {
14
+ return response;
15
+ }
16
+ return parsedResponse.data;
17
});
18
19
export default {
0 commit comments