From 7cfe7da73de188f548b713389e80892ea4ed1b15 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:09:05 +0900 Subject: [PATCH] fix --- packages/backend/src/core/CacheService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/CacheService.ts b/packages/backend/src/core/CacheService.ts index 68f37d0cf..263df5647 100644 --- a/packages/backend/src/core/CacheService.ts +++ b/packages/backend/src/core/CacheService.ts @@ -133,14 +133,14 @@ export class CacheService implements OnApplicationShutdown { if (user == null) { this.userByIdCache.delete(body.id); for (const [k, v] of this.uriPersonCache.cache.entries()) { - if (v.value === body.id) { + if (v.value?.id === body.id) { this.uriPersonCache.delete(k); } } } else { this.userByIdCache.set(user.id, user); for (const [k, v] of this.uriPersonCache.cache.entries()) { - if (v.value === user.id) { + if (v.value?.id === user.id) { this.uriPersonCache.set(k, user); } }