diff --git a/actors/insertion-writer/src/index.ts b/actors/insertion-writer/src/index.ts index ba3c31dc2e..45fb47b338 100644 --- a/actors/insertion-writer/src/index.ts +++ b/actors/insertion-writer/src/index.ts @@ -30,10 +30,12 @@ export class InsertionWriter { } async start(queryThrottleMs?: number): Promise { - const logTip = (await this.insertionLog.getTip()) ?? "0-0"; + const logTip = await this.insertionLog.getTip(); this.logger.debug(`current log tip: ${logTip}`); - const logTipMerkleIndex = merkleIndexFromRedisStreamId(logTip); + const logTipMerkleIndex = logTip + ? merkleIndexFromRedisStreamId(logTip) + : undefined; this.logger.debug("starting iterator"); const newInsertionBatches = this.adapter.iterInsertions( logTipMerkleIndex ?? 0,