mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 16:26:44 -06:00
fix type in CustomEmojiService
This commit is contained in:
parent
b7d056fb22
commit
6ea057f8f8
1 changed files with 2 additions and 2 deletions
|
@ -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),
|
||||
}]));
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue