Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditions changed according to the requirement #454

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ipfs-webui
Submodule ipfs-webui added at a787f8
6 changes: 3 additions & 3 deletions src/lib/normalise-dag-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export function normaliseDagCbor (data: NormalizedDagNode['data'], cid: string,
* A valid IPLD link in a dag-cbor node is an object with single "/" property.
*/
export function findAndReplaceDagCborLinks (obj: unknown, sourceCid: string, path: string = ''): NormalizedDagLink[] {
if (obj == null || typeof obj !== 'object' || Buffer.isBuffer(obj) || typeof obj === 'string') {
return []
}
if (obj == null || (typeof obj !== 'object') || ((typeof obj == 'object' || !Buffer.isBuffer(obj)) && typeof obj === 'string')) {
return []
}

// FIXME: remove as any cast
const cid = toCidOrNull(obj as any)
Expand Down