more fixes for emoji popover

This commit is contained in:
Henry Jameson 2026-06-30 15:38:55 +03:00
commit 8ffc2e2906

View file

@ -45,12 +45,7 @@ export default {
shortcode: this.shortcode, shortcode: this.shortcode,
filename: '', filename: '',
}) })
.then((resp) => resp.json()) .then(({ data: resp }) => {
.then((resp) => {
if (resp.error !== undefined) {
this.displayError(resp.error)
return
}
useInterfaceStore().pushGlobalNotice({ useInterfaceStore().pushGlobalNotice({
messageKey: 'admin_dash.emoji.copied_successfully', messageKey: 'admin_dash.emoji.copied_successfully',
messageArgs: [this.shortcode, this.packName], messageArgs: [this.shortcode, this.packName],
@ -60,6 +55,10 @@ export default {
this.$refs.emojiPopover.hidePopover() this.$refs.emojiPopover.hidePopover()
this.packName = '' this.packName = ''
}) })
.catch((e) => {
this.displayError(e)
return
})
}, },
fetchEmojiPacksIfAdmin() { fetchEmojiPacksIfAdmin() {