diff --git a/fluent/StorageRune.ts b/fluent/StorageRune.ts index d6d8c1935..c372f222e 100644 --- a/fluent/StorageRune.ts +++ b/fluent/StorageRune.ts @@ -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, Chain.Storage.Value][]>() + .into(ValueRune) } keysRaw(