mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-05 18:13:07 +02:00
upd: return empty list on empty custom emoji
This commit is contained in:
parent
5aa2b197da
commit
62b2c31655
1 changed files with 1 additions and 1 deletions
|
@ -2178,7 +2178,7 @@ export default class Misskey implements MegalodonInterface {
|
|||
public async getInstanceCustomEmojis(): Promise<Response<Array<Entity.Emoji>>> {
|
||||
return this.client
|
||||
.get<{ emojis: Array<MisskeyAPI.Entity.Emoji> }>('/api/emojis')
|
||||
.then(res => ({ ...res, data: res.data.emojis.map(e => MisskeyAPI.Converter.emoji(e)) }))
|
||||
.then(res => ({ ...res, data: res.data.emojis && res.data.emojis.length > 0 ? res.data.emojis.map(e => MisskeyAPI.Converter.emoji(e)) : [] }))
|
||||
}
|
||||
|
||||
// ======================================
|
||||
|
|
Loading…
Reference in a new issue