Skip to content

Commit 0ee7a4a

Browse files
committed
pool+batches: fix error when there are no batches
1 parent e83c89d commit 0ee7a4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/src/store/stores/batchStore.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export default class BatchStore {
121121
this._store.log.info('fetching latest batch');
122122
try {
123123
const [poolBatch] = (await this._store.api.pool.batchSnapshots(1)).batchesList;
124+
// handle edge case that should only be possible on regtest with no batches
125+
if (!poolBatch) return;
124126
// update the timestamp of the next batch when fetching the latest batch
125127
await this.fetchNextBatchTimestamp();
126128
runInAction(() => {

0 commit comments

Comments
 (0)