Skip to content

Commit

Permalink
fix: unexpected behavior of tag selection
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Aug 20, 2024
1 parent 6334d36 commit 086de7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/libs/IOUUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ function insertTagIntoTransactionTagsString(transactionTags: string, tag: string
const tagArray = TransactionUtils.getTagArrayFromName(transactionTags);
tagArray[tagIndex] = tag;

return tagArray
.map((tagItem) => tagItem.trim())
.filter((tagItem) => !!tagItem)
.join(CONST.COLON);
while (tagArray.length > 0 && !tagArray[tagArray.length - 1]) {
tagArray.pop();
}

return tagArray.map((tagItem) => tagItem.trim()).join(CONST.COLON);
}

function isMovingTransactionFromTrackExpense(action?: IOUAction) {
Expand Down

0 comments on commit 086de7d

Please sign in to comment.