Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
fix: return empty list when no entries (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay authored Jul 13, 2023
1 parent 3722265 commit 031b00b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fluent/StorageRune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ export class StorageRune<
return Rune
.tuple([this.entriesRaw(props, blockHash).access(0), this.$key, this.$value])
.map(([changeset, $key, $value]) =>
changeset!.changes.map(([k, v]) => [
changeset?.changes.map(([k, v]) => [
$key.decode(hex.decode(k)),
v ? $value.decode(hex.decode(v)) : undefined,
])
]) ?? []
)
.unsafeAs<[Chain.Storage.Key<C, P, S>, Chain.Storage.Value<C, P, S>][]>()
.into(ValueRune)
}

keysRaw<X, Y>(
Expand Down

0 comments on commit 031b00b

Please sign in to comment.