From 7c9bacbbd824a850b2d1061b3476e24806375a23 Mon Sep 17 00:00:00 2001 From: taichan Date: Tue, 20 Feb 2024 15:44:13 +0900 Subject: [PATCH] use isNotNull --- packages/backend/src/core/entities/NotificationEntityService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts index 24ae0bdf3e..824f0b7fda 100644 --- a/packages/backend/src/core/entities/NotificationEntityService.ts +++ b/packages/backend/src/core/entities/NotificationEntityService.ts @@ -353,7 +353,7 @@ export class NotificationEntityService implements OnModuleInit { const filteredNotifications = ((await Promise.all(notifications.map(async (notification) => { const isValid = await this.#validateNotifier(notification, meId, userIdsWhoMeMuting, userMutedInstances); return isValid ? notification : null; - }))) as [T|null] ).filter((notification): notification is T => notification !== null); + }))) as [T|null] ).filter(isNotNull); return filteredNotifications; }