Reject empty tag strings

This commit is contained in:
Râu Cao
2022-12-31 12:20:27 +07:00
parent c7eb81450c
commit 0b0dea095f
+3 -1
View File
@@ -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);