From 6ea057f8f89eec482e2b51bbd34ce3b8ebd739c6 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 12 Apr 2023 12:09:28 +0000 Subject: [PATCH] fix type in CustomEmojiService --- packages/backend/src/core/CustomEmojiService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 072dab7ce2..0f26d22666 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -46,9 +46,9 @@ export class CustomEmojiService { toRedisConverter: (value) => JSON.stringify(Array.from(value.values())), fromRedisConverter: (value) => { if (!Array.isArray(JSON.parse(value))) return undefined; // 古いバージョンの壊れたキャッシュが残っていることがある(そのうち消す) - return new Map(JSON.parse(value).map((x) => [x.name, { + return new Map(JSON.parse(value).map((x: Emoji) => [x.name, { ...x, - updatedAt: new Date(x.updatedAt), + updatedAt: x.updatedAt && new Date(x.updatedAt), }])); }, });