Skip to content

Commit

Permalink
Merge pull request #3426 from Vizzuality/fix/infinite-loop
Browse files Browse the repository at this point in the history
fix/infinite-loop
  • Loading branch information
pjosh committed May 23, 2018
2 parents 6771909 + a62a230 commit c0fe661
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/javascript/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ const request = {
const axiosInstance = axios.create();
const haveException = checkException(exceptionId);
if (!cacheError && !haveException) {
axiosInstance.interceptors.response.use(response => {
addKey(key, response.data, expire, exceptionId);
return response;
});
axiosInstance.interceptors.response.use(response =>
addKey(key, response.data, expire, exceptionId).then(() => response)
);
}
return axiosInstance.get(url);
}
Expand Down

0 comments on commit c0fe661

Please sign in to comment.