Skip to content

Commit

Permalink
feat(hydrate): parse JSON-based cache value
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Jan 8, 2016
1 parent 1e2db42 commit 8386519
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ value should have the following format
}
}
*/
const xhr = value.body || {}
const headers = value.headers || {}
export default function hydrate (value) {
const data = JSON.parse(value)
const xhr = data.body || {}
const headers = data.headers || {}

xhr.getAllResponseHeaders = function () {
return headers
Expand Down

0 comments on commit 8386519

Please sign in to comment.