Trim input tag

This commit is contained in:
Alex Ling 2020-12-30 08:14:55 +00:00
parent b05ed57762
commit c6ee5409f8

View File

@ -259,7 +259,7 @@ const tagsComponent = () => {
newTag: '', newTag: '',
inputShown: false, inputShown: false,
add() { add() {
const tag = this.newTag; const tag = this.newTag.trim();
this.request(tag, 'PUT', () => { this.request(tag, 'PUT', () => {
this.tags.push(tag); this.tags.push(tag);
this.newTag = ''; this.newTag = '';