-
Notifications
You must be signed in to change notification settings - Fork 9
Querying a double map with a partial key results in an exception #1169
Comments
In the second case, seems there are no entries associated with the partial key, hence no Please confirm that the second should in fact be an empty list. |
Confirmed, just as with |
For many use cases, you can just const entries = await spiritnet.Did.ServiceEndpoints
.entries({
partialKey: [ss58.decode('4saFtHZuY9UH1U7zasKLSkKsPogJjPqM1vT2k3ZJmrYmmr3g')[1]],
})
.run()
const mapped = entries.map(cb) For larger runes (such as derived reads and workflows), staying within the rune system preserves intermediate error types and ensures certain values are memoized. For these cases, you can use the const mapped = await spiritnet.Did.ServiceEndpoints
.entries({
partialKey: [ss58.decode('4saFtHZuY9UH1U7zasKLSkKsPogJjPqM1vT2k3ZJmrYmmr3g')[1]],
})
.into(ArrayRune)
.mapArray(cb)
.run() |
You're right, returning as a |
Just triggered a release of v0.1.1-beta.1. It's been published to NPM and Denoland/x. |
fixed the issue for me :) |
Bug Report
Querying a double map with a partial key throws if there are no results on
v0.1.0-gamma.1
.Current Behavior
Throws exception due to
changeset
being undefined.Expected Behavior
Returns empty array.
Steps To Reproduce
nets.js
reproduce.js
Environment
v20.4.0
The text was updated successfully, but these errors were encountered: