From 8ac5dad60b4f0cee66837481bd6b23cc04cca368 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Thu, 19 Oct 2023 18:50:37 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E7=B5=B5=E6=96=87=E5=AD=97=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=AB=E3=83=80=E3=81=8C=E6=AD=A3=E5=B8=B8=E3=81=AB?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/MkEmojiPicker.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 36a9e5c892..2ab663dfb0 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -159,15 +159,19 @@ customEmojiCategories.value.forEach(e => { const groupedData = {}; split_categories.forEach((item) => { - if (!groupedData[item[0]]) { - groupedData[item[0]] = []; - groupedData[item[0]].push(item[0]); - }else{ - groupedData[item[0]].push(item[1]); - } -}); -console.log(groupedData) + const key = item[0]; + if (!groupedData[key]) { + groupedData[key] = []; + groupedData[key].push(item[0]); + } + if (item[1] !== undefined){ + groupedData[key].push(item[1]); + } + +}); + +console.log(groupedData) watch(q, () => { if (emojisEl.value) emojisEl.value.scrollTop = 0;