Put back links in throw
parent
8ae7b675ae
commit
7042add4b0
|
@ -72,7 +72,8 @@ const AJAX = async (
|
|||
// AJAX request and action creator.
|
||||
return links ? generateResponseWithLinks(response, links) : response
|
||||
} catch (error) {
|
||||
throw links ? generateResponseWithLinks(error, links) : error // eslint-disable-line no-throw-literal
|
||||
const {response} = error
|
||||
throw links ? generateResponseWithLinks(response, links) : response // eslint-disable-line no-throw-literal
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue