Skip to content

Commit

Permalink
temp fix for download things in electron
Browse files Browse the repository at this point in the history
  • Loading branch information
EragonJ committed Aug 31, 2016
1 parent f5c31b6 commit 5de71bf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/download-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ downloadRequest = function (path, args, accessToken, selectUser) {
}

// Apply the node binary parser to the response if executing in node
if (typeof window === 'undefined') {
apiRequest
.buffer(true)
.parse(nodeBinaryParser)
.end(responseHandler);
} else {
apiRequest.end(responseHandler);
}
apiRequest
.buffer(true)
.parse(nodeBinaryParser)
.end(responseHandler);
};

return new Promise(promiseFunction);
Expand Down

0 comments on commit 5de71bf

Please sign in to comment.