diff --git a/src/api/emojiPacks.js b/src/api/emojiPacks.js index b45dfb11..e7b987da 100644 --- a/src/api/emojiPacks.js +++ b/src/api/emojiPacks.js @@ -87,7 +87,10 @@ export async function addNewEmojiFile(packName, file, shortcode, filename, host, url: `/api/pleroma/emoji/packs/${packName}/files`, method: 'post', headers: authHeaders(token), - data: { file, shortcode, filename: filename || null } + data: { + file, + shortcode: shortcode.trim() !== '' ? shortcode : null, + filename: filename.trim() !== '' ? filename : null } }) } diff --git a/src/views/emojiPacks/components/NewEmojiUploader.vue b/src/views/emojiPacks/components/NewEmojiUploader.vue index 8e86f243..5229e566 100644 --- a/src/views/emojiPacks/components/NewEmojiUploader.vue +++ b/src/views/emojiPacks/components/NewEmojiUploader.vue @@ -1,7 +1,7 @@