From f0e720931baba395e089da7a640d901a2024835b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 29 Jan 2022 02:54:56 +0900 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E6=8A=95=E7=A8=BF=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AE=E3=83=8F=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E3=82=BF=E3=82=B0=E4=BF=9D=E6=8C=81=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=89=E3=81=8C=E5=8B=95=E4=BD=9C=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #8212 --- CHANGELOG.md | 1 + packages/client/src/components/post-form.vue | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 656c33b20..5bb56be2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - トレンドウィジェットが動作しないのを修正 - リアクション設定で絵文字ピッカーが開かないのを修正 - DMページでメンションが含まれる問題を修正 +- 投稿フォームのハッシュタグ保持フィールドが動作しない問題を修正 - Add `img-src` and `media-src` directives to `Content-Security-Policy` for files and media proxy diff --git a/packages/client/src/components/post-form.vue b/packages/client/src/components/post-form.vue index 8c5027f8e..6db4d926d 100644 --- a/packages/client/src/components/post-form.vue +++ b/packages/client/src/components/post-form.vue @@ -540,8 +540,8 @@ async function post() { }; if (withHashtags && hashtags && hashtags.trim() !== '') { - const hashtags = hashtags.trim().split(' ').map(x => x.startsWith('#') ? x : '#' + x).join(' '); - data.text = data.text ? `${data.text} ${hashtags}` : hashtags; + const hashtags_ = hashtags.trim().split(' ').map(x => x.startsWith('#') ? x : '#' + x).join(' '); + data.text = data.text ? `${data.text} ${hashtags_}` : hashtags_; } // plugin @@ -565,9 +565,9 @@ async function post() { deleteDraft(); emit('posted'); if (data.text && data.text != '') { - const hashtags = mfm.parse(data.text).filter(x => x.type === 'hashtag').map(x => x.props.hashtag); + const hashtags_ = mfm.parse(data.text).filter(x => x.type === 'hashtag').map(x => x.props.hashtag); const history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[]; - localStorage.setItem('hashtags', JSON.stringify(unique(hashtags.concat(history)))); + localStorage.setItem('hashtags', JSON.stringify(unique(hashtags_.concat(history)))); } posting = false; postAccount = null;