Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 52298ae

Browse files
requilencealanshaw
authored andcommittedJul 10, 2018
fix: Request logging broken in Electron (#808)
check whether res.req is set instead of relying on detect-node
1 parent dcbbe74 commit 52298ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/utils/send-request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function onRes (buffer, cb) {
3737
const isJson = res.headers['content-type'] &&
3838
res.headers['content-type'].indexOf('application/json') === 0
3939

40-
if (isNode) {
40+
if (res.req) {
4141
log(res.req.method, `${res.req.getHeaders().host}${res.req.path}`, res.statusCode, res.statusMessage)
4242
} else {
4343
log(res.url, res.statusCode, res.statusMessage)

0 commit comments

Comments
 (0)