ハッシュタグ入力が空のときに#が付くのを修正

This commit is contained in:
syuilo 2021-08-10 16:06:14 +09:00
parent b20bf1a90b
commit 488e05b934

View file

@ -615,7 +615,7 @@ export default defineComponent({
viaMobile: isMobile
};
if (this.withHashtags) {
if (this.withHashtags && this.hashtags && this.hashtags.trim() !== '') {
const hashtags = this.hashtags.trim().split(' ').map(x => x.startsWith('#') ? x : '#' + x).join(' ');
data.text = data.text ? `${data.text} ${hashtags}` : hashtags;
}