mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
web/statestore: ignore packs with no images
This commit is contained in:
parent
d9d0718bc6
commit
64f9fccfd7
2 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ export class StateStore {
|
|||
getPersonalEmojiPack(): CustomEmojiPack | null {
|
||||
if (this.#personalEmojiPack === null) {
|
||||
const pack = this.accountData.get("im.ponies.user_emotes")
|
||||
if (!pack) {
|
||||
if (!pack || !pack.images) {
|
||||
return null
|
||||
}
|
||||
this.#personalEmojiPack = parseCustomEmojiPack(pack as ImagePack, "personal", "Personal pack")
|
||||
|
|
|
@ -120,7 +120,7 @@ export class RoomStateStore {
|
|||
getEmojiPack(key: string): CustomEmojiPack | null {
|
||||
if (!this.emojiPacks.has(key)) {
|
||||
const pack = this.getStateEvent("im.ponies.room_emotes", key)?.content
|
||||
if (!pack) {
|
||||
if (!pack || !pack.images) {
|
||||
this.emojiPacks.set(key, null)
|
||||
return null
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue