Reject empty tag strings
This commit is contained in:
@@ -81,7 +81,9 @@ export default class AddExpenseItemComponent extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isPresent(this.tags)) {
|
if (isPresent(this.tags)) {
|
||||||
expense.tags = this.tags.split(',').map(t => t.trim());
|
expense.tags = this.tags.split(',')
|
||||||
|
.map(t => t.trim())
|
||||||
|
.filter(t => t.length > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.args.addExpenseItem(expense);
|
this.args.addExpenseItem(expense);
|
||||||
|
|||||||
Reference in New Issue
Block a user