Skip to content

Commit 28826ca

Browse files
Alan Shawrvagg
Alan Shaw
authored andcommitted
fix: use fanout
1 parent f2fc563 commit 28826ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { UnixFS } from 'ipfs-unixfs'
2+
import errCode from 'err-code'
13
import { decode, type PBNode } from '@ipld/dag-pb'
24
import errCode from 'err-code'
35
import { UnixFS } from 'ipfs-unixfs'
@@ -33,7 +35,7 @@ async function * listDirectory (node: PBNode, path: string, resolve: Resolve, de
3335
throw errCode(err, 'ERR_NOT_UNIXFS')
3436
}
3537

36-
if (dir.fanout == null) {
38+
if (!dir.fanout) {
3739
throw errCode(new Error('missing fanout'), 'ERR_NOT_UNIXFS')
3840
}
3941

0 commit comments

Comments
 (0)