Skip to content

Commit

Permalink
Merge pull request #46977 from daledah/fix/46494
Browse files Browse the repository at this point in the history
fix: create expense with colon tag returns error
  • Loading branch information
Julesssss authored Aug 9, 2024
2 parents 526fc6f + 1d6c068 commit ef3f178
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 ef3f178

Please sign in to comment.