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

Commit 9d8b44b

Browse files
committed
fix: failing type check
Note: filter on Array<T> does refine T type.
1 parent 277ae23 commit 9d8b44b

File tree

1 file changed

+1
-2
lines changed
  • packages/ipfs-grpc-server/src/endpoints

1 file changed

+1
-2
lines changed

packages/ipfs-grpc-server/src/endpoints/add.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module.exports = function grpcAdd (ipfs, options = {}) {
5656

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

6261
fileInputStream.push({
@@ -83,7 +82,7 @@ module.exports = function grpcAdd (ipfs, options = {}) {
8382
fileInputStream.end(err)
8483
} finally {
8584
// clean up any open streams
86-
streams.filter(Boolean).forEach(stream => stream.end())
85+
streams.forEach(stream => stream && stream.end())
8786
}
8887
}, 0)
8988

0 commit comments

Comments
 (0)