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

Commit 077c997

Browse files
committed
fix: only do the big file workaround in node and electron main
1 parent 7934103 commit 077c997

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"fs-extra": "^8.1.0",
6161
"glob": "^7.1.3",
6262
"ipfs-block": "~0.8.1",
63-
"ipfs-utils": "^0.3.0",
63+
"ipfs-utils": "^0.4.0",
6464
"ipld-dag-cbor": "~0.15.0",
6565
"ipld-dag-pb": "~0.17.3",
6666
"ipld-raw": "^4.0.0",
@@ -101,15 +101,15 @@
101101
"through2": "^3.0.1"
102102
},
103103
"devDependencies": {
104-
"aegir": "^20.2.0",
104+
"aegir": "^20.3.1",
105105
"browser-process-platform": "~0.1.1",
106106
"chai": "^4.2.0",
107107
"chai-as-promised": "^7.1.1",
108-
"cross-env": "^5.2.1",
108+
"cross-env": "^6.0.0",
109109
"dirty-chai": "^2.0.1",
110110
"go-ipfs-dep": "^0.4.22",
111111
"interface-ipfs-core": "~0.114.0",
112-
"ipfsd-ctl": "^0.46.2",
112+
"ipfsd-ctl": "^0.47.1",
113113
"nock": "^11.3.2",
114114
"stream-equal": "^1.1.1"
115115
},

src/lib/error-handler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const { HTTPError } = require('ky-universal')
44
const log = require('debug')('ipfs-http-client:lib:error-handler')
5-
const { isNode, isElectron } = require('ipfs-utils/src/env')
5+
const { isNode, isElectronMain } = require('ipfs-utils/src/env')
66

77
function isJsonResponse (res) {
88
return (res.headers.get('Content-Type') || '').startsWith('application/json')
@@ -18,7 +18,7 @@ module.exports = async function errorHandler (input, options, response) {
1818
//
1919
// If the body in the clone is not consumed or destroyed the highwater mark
2020
// will be reached (for large payloads) and stop the real body from flowing.
21-
if (isNode || isElectron) response.body.destroy()
21+
if (isNode || isElectronMain) response.body.destroy()
2222
return
2323
}
2424

0 commit comments

Comments
 (0)