Skip to content

Commit

Permalink
fix(casting): properly follow an unpopulated state entry
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig authored and mhofman committed Dec 6, 2023
1 parent b427ad7 commit 7cebb0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/casting/src/follower-cosmjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,12 @@ export const makeCosmjsFollower = (
// If the block has no corresponding data, wait for the first block to
// contain data.
for (;;) {
({ value: cursorData, height: cursorBlockHeight } = await getDataAtHeight(
let thisHeight;
({ value: cursorData, height: thisHeight } = await getDataAtHeight(
cursorBlockHeight,
));
if (cursorData.length !== 0) {
cursorBlockHeight = thisHeight;
const cursorStreamCell = streamCellForData(
cursorBlockHeight,
cursorData,
Expand Down

0 comments on commit 7cebb0f

Please sign in to comment.