fix: fix ClientRequest.getUploadProgress (#21388)

This commit is contained in:
Jeremy Apthorp 2019-12-06 13:14:44 -08:00 committed by GitHub
parent dc9beda182
commit 092e00f7f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -454,7 +454,7 @@ class ClientRequest extends Writable {
}
getUploadProgress () {
return { ...this._uploadProgress } || { active: false }
return this._uploadProgress ? { ...this._uploadProgress } : { active: false }
}
}