From 4a064ec0bb065c664b9c793e792dc86349b88003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 19 Aug 2025 17:50:05 +0200 Subject: [PATCH] keep the code similar to the previous one --- src/lib/features/events/event-store.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/features/events/event-store.ts b/src/lib/features/events/event-store.ts index c19dff5bb3..dfd4f0add8 100644 --- a/src/lib/features/events/event-store.ts +++ b/src/lib/features/events/event-store.ts @@ -217,12 +217,12 @@ export class EventStore implements IEventStore { environment?: string, ): Promise { const stopTimer = this.metricTimer('getMaxRevisionId'); - const query = this.db(TABLE) + const row = await this.db(TABLE) .max('id') .where(this.typeIsInteresting(environment)) - .andWhere('id', '>=', largerThan); + .andWhere('id', '>=', largerThan) + .first(); - const row = await query.first(); stopTimer(); return row?.max ?? 0; }