From 29c0800259b98f0ec007545b63fbe0104102fa39 Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Wed, 11 Dec 2024 17:05:18 +0100 Subject: [PATCH] chore: fix a typo in #getOrCategoryEntry --- .../src/notifications/NotificationsModelHelper.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/job-worker/src/notifications/NotificationsModelHelper.ts b/packages/job-worker/src/notifications/NotificationsModelHelper.ts index 78e5446be7..28092d902f 100644 --- a/packages/job-worker/src/notifications/NotificationsModelHelper.ts +++ b/packages/job-worker/src/notifications/NotificationsModelHelper.ts @@ -66,7 +66,7 @@ export class NotificationsModelHelper implements INotificationsModel { } async getAllNotifications(category: string): Promise { - const notificationsForCategory = this.#getOrCategoryEntry(category) + const notificationsForCategory = this.#getOrCreateCategoryEntry(category) await this.#getAllNotificationsRaw(notificationsForCategory, category) @@ -98,14 +98,14 @@ export class NotificationsModelHelper implements INotificationsModel { } clearNotification(category: string, notificationId: string): void { - const notificationsForCategory = this.#getOrCategoryEntry(category) + const notificationsForCategory = this.#getOrCreateCategoryEntry(category) // The notification may or may not be loaded, but this indicates that to the saving that we intend to delete it notificationsForCategory.updatedNotifications.set(notificationId, null) } setNotification(category: string, notification: INotificationWithTarget): void { - const notificationsForCategory = this.#getOrCategoryEntry(category) + const notificationsForCategory = this.#getOrCreateCategoryEntry(category) const fullCategory = this.#getFullCategoryName(category) notificationsForCategory.updatedNotifications.set(notification.id, { @@ -119,7 +119,7 @@ export class NotificationsModelHelper implements INotificationsModel { } clearAllNotifications(category: string): void { - const notificationsForCategory = this.#getOrCategoryEntry(category) + const notificationsForCategory = this.#getOrCreateCategoryEntry(category) // Tell this store that any documents not in the `updatedNotifications` should be deleted notificationsForCategory.removeAllMissing = true @@ -128,7 +128,7 @@ export class NotificationsModelHelper implements INotificationsModel { notificationsForCategory.updatedNotifications.clear() } - #getOrCategoryEntry(category: string): NotificationsLoadState { + #getOrCreateCategoryEntry(category: string): NotificationsLoadState { let notificationsForCategory = this.#notificationsByCategory.get(category) if (!notificationsForCategory) { notificationsForCategory = {