Put back links in throw

pull/10616/head
Andrew Watkins 2018-03-09 14:51:55 -08:00
parent 8ae7b675ae
commit 7042add4b0
1 changed files with 2 additions and 1 deletions

View File

@ -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
}
}