Skip to content

Commit

Permalink
Small Suggestion Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsmedley committed Jul 22, 2024
1 parent 6ec36e3 commit 927558e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/car/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ class DefaultCar implements Car {
void queue.add(async () => {
await this.#walkDag(root, queue, async (cid, bytes) => {
// check if duplicate blocks should be skipped
if (typeof options?.blockFilter !== 'undefined') {
if (options.blockFilter != null) {
// skip blocks that have already been written
if (options?.blockFilter.has(cid.toString())) {
if (options.blockFilter.has(cid.toString())) {
return
}
options?.blockFilter.add(cid.toString())
options.blockFilter.add(cid.toString())
}
await writer.put({ cid, bytes })
}, options)
Expand Down

0 comments on commit 927558e

Please sign in to comment.