remove empty tag before submit

This commit is contained in:
feruz 2020-01-29 07:06:10 +02:00
parent fbb0e550a4
commit fba798c3ad

View File

@ -234,7 +234,9 @@ class EditorContainer extends Component {
this.setState({ isPostSending: true });
const meta = extractMetadata(fields.body);
const jsonMeta = makeJsonMetadata(meta, fields.tags);
const _tags = fields.tags.filter(tag => tag && tag !== ' ');
const jsonMeta = makeJsonMetadata(meta, _tags);
// TODO: check if permlink is available github: #314 https://github.com/esteemapp/esteem-mobile/pull/314
let permlink = generatePermlink(fields.title);
@ -251,7 +253,7 @@ class EditorContainer extends Component {
const author = currentAccount.name;
const options = makeOptions(author, permlink);
const parentPermlink = fields.tags[0] || 'hive-125125';
const parentPermlink = _tags[0] || 'hive-125125';
if (scheduleDate) {
await this._setScheduledPost({