Skip to content

Commit

Permalink
promise resolve body if set as stream in config
Browse files Browse the repository at this point in the history
  • Loading branch information
ThobyV committed Sep 16, 2020
1 parent ec2c6f2 commit 9858c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
if (ok) {
const hasData =
opts.responseType == 'stream'
? res.body
? Promise.resolve(res.body)
: opts.responseType
? res[opts.responseType]()
: res.json();
Expand Down

0 comments on commit 9858c7e

Please sign in to comment.