Skip to content

Commit

Permalink
fix: bitswap check err.name
Browse files Browse the repository at this point in the history
  • Loading branch information
dozyio committed Aug 31, 2024
1 parent ac4bdb8 commit be6f70f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bitswap/src/peer-want-lists/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export class Ledger {
})
}
} catch (err: any) {
if (err.code !== 'ERR_NOT_FOUND') {
if (
(err.code !== undefined && err.code !== 'ERR_NOT_FOUND') ||
(err.name !== undefined && err.name !== 'NotFoundError')
) {
throw err
}

Expand Down

0 comments on commit be6f70f

Please sign in to comment.