We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87c1898 commit f3e6e6cCopy full SHA for f3e6e6c
src/CoreApi/KeyApi.cs
@@ -62,8 +62,9 @@ internal KeyApi(IpfsClient ipfs)
62
public async Task<IKey> RemoveAsync(string name, CancellationToken cancel = default(CancellationToken))
63
{
64
var json = await ipfs.DoCommandAsync("key/rm", cancel, name);
65
- var keys = (JArray)(JObject.Parse(json)["Keys"]);
66
- return keys
+ var keys = JObject.Parse(json)["Keys"] as JArray;
+
67
+ return keys?
68
.Select(k => new KeyInfo
69
70
Id = (string)k["Id"],
0 commit comments