diff --git a/src/components/still-image/still-image-emoji-popover.js b/src/components/still-image/still-image-emoji-popover.js index 6db72c49f..92cc20904 100644 --- a/src/components/still-image/still-image-emoji-popover.js +++ b/src/components/still-image/still-image-emoji-popover.js @@ -45,7 +45,12 @@ export default { shortcode: this.shortcode, filename: '', }) - .then(({ data: resp }) => { + .then((resp) => resp.json()) + .then((resp) => { + if (resp.error !== undefined) { + this.displayError(resp.error) + return + } useInterfaceStore().pushGlobalNotice({ messageKey: 'admin_dash.emoji.copied_successfully', messageArgs: [this.shortcode, this.packName], @@ -55,10 +60,6 @@ export default { this.$refs.emojiPopover.hidePopover() this.packName = '' }) - .catch((e) => { - this.displayError(e) - return - }) }, fetchEmojiPacksIfAdmin() {