From 6416718102ec9ad956a1e44936afc96350e09601 Mon Sep 17 00:00:00 2001 From: vrde Date: Wed, 5 Jul 2017 17:13:05 +0200 Subject: [PATCH] Fix eslint errors --- src/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.js b/src/request.js index 9b0a622..8a92923 100644 --- a/src/request.js +++ b/src/request.js @@ -30,7 +30,7 @@ export default function request(url, config = {}) { } return baseRequest(apiUrl, requestConfig) - .then(res => res.json()) + .then(res => (onlyJsonResponse ? res.json() : { json: res.json(), url: res.url })) .catch(err => { console.error(err) throw err