Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: failing type check
Browse files Browse the repository at this point in the history
Note: filter on Array<T> does refine T type.
  • Loading branch information
Gozala committed Jan 26, 2021
1 parent 277ae23 commit 9d8b44b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/ipfs-grpc-server/src/endpoints/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module.exports = function grpcAdd (ipfs, options = {}) {

if (!stream) {
// start of new file
// @ts-ignore
stream = streams[index] = pushable()

fileInputStream.push({
Expand All @@ -83,7 +82,7 @@ module.exports = function grpcAdd (ipfs, options = {}) {
fileInputStream.end(err)
} finally {
// clean up any open streams
streams.filter(Boolean).forEach(stream => stream.end())
streams.forEach(stream => stream && stream.end())
}
}, 0)

Expand Down

0 comments on commit 9d8b44b

Please sign in to comment.