We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dbf726 commit a6e2f12Copy full SHA for a6e2f12
lib/install/audit.js
@@ -40,7 +40,14 @@ function submitForInstallReport (auditData) {
40
// we don't care about the response so destroy the stream if we can, or leave it flowing
41
// so it can eventually finish and clean up after itself
42
fetchAudit(url.resolve(reg, '/-/npm/v1/security/audits/quick'))
43
- .then((_) => _.body.destroy ? _.body.destroy() : _.body.resume(), (_) => {})
+ .then((_) => {
44
+ _.body.on('error', () => {})
45
+ if (_.body.destroy) {
46
+ _.body.destroy()
47
+ } else {
48
+ _.body.resume()
49
+ }
50
+ }, () => {})
51
})
52
perf.emit('time', 'audit submit')
53
return fetchAudit('/-/npm/v1/security/audits/quick', body).then((response) => {
0 commit comments