We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e16510 commit 04b7a8fCopy full SHA for 04b7a8f
src/CoreApi/ObjectApi.cs
@@ -50,16 +50,14 @@ public ObjectApi(IpfsEngine ipfs)
50
51
public async Task<IEnumerable<IMerkleLink>> LinksAsync(Cid id, CancellationToken cancel = default(CancellationToken))
52
{
53
- var block = await ipfs.Block.GetAsync(id, cancel).ConfigureAwait(false);
54
- try
55
- {
56
- var node = new DagNode(block.DataStream);
57
- return node.Links;
58
- }
59
- catch
+ if (id.ContentType != "dag-pb")
60
61
return Enumerable.Empty<IMerkleLink>();
62
}
+
+ var block = await ipfs.Block.GetAsync(id, cancel).ConfigureAwait(false);
+ var node = new DagNode(block.DataStream);
+ return node.Links;
63
64
65
public Task<DagNode> NewAsync(string template = null, CancellationToken cancel = default(CancellationToken))
0 commit comments