From 1057da1556afe033b3d33b741104b276fb108c0c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 9 Apr 2023 09:53:02 +0900 Subject: [PATCH] add note --- packages/backend/src/core/CustomEmojiService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 0a7ee4b9c9..dc365986fe 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -45,6 +45,7 @@ export class CustomEmojiService { fetcher: () => this.emojisRepository.find({ where: { host: IsNull() } }).then(emojis => new Map(emojis.map(emoji => [emoji.name, emoji]))), toRedisConverter: (value) => JSON.stringify(value.values()), fromRedisConverter: (value) => { + // 原因不明だが配列以外が入ってくることがあるため if (!Array.isArray(JSON.parse(value))) return undefined; return new Map(JSON.parse(value).map((x: Emoji) => [x.name, x])); }, // TODO: Date型の変換