Skip to content

Commit

Permalink
fix: create expense with colon tag returns error
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Aug 7, 2024
1 parent 33f9e00 commit 1d6c068
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/IOUUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ function insertTagIntoTransactionTagsString(transactionTags: string, tag: string
const tagArray = TransactionUtils.getTagArrayFromName(transactionTags);
tagArray[tagIndex] = tag;

return tagArray.join(CONST.COLON).replace(/:*$/, '');
return tagArray
.map((tagItem) => tagItem.trim())
.filter((tagItem) => !!tagItem)
.join(CONST.COLON);
}

function isMovingTransactionFromTrackExpense(action?: IOUAction) {
Expand Down

0 comments on commit 1d6c068

Please sign in to comment.