Skip to content

Commit

Permalink
Remove trim
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-hauser committed Feb 14, 2024
1 parent e28bfb3 commit 46826a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scrapers/max.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ function getChargedCurrency(currencyId: number | null) {
}
}

export function getMemo({ comments, fundsTransferReceiverOrTransfer, fundsTransferComment }: Pick<ScrapedTransaction, 'comments'| 'fundsTransferReceiverOrTransfer' | 'fundsTransferComment'>) {
export function getMemo({
comments, fundsTransferReceiverOrTransfer, fundsTransferComment,
}: Pick<ScrapedTransaction, 'comments'| 'fundsTransferReceiverOrTransfer' | 'fundsTransferComment'>) {
if (fundsTransferReceiverOrTransfer) {
const memo = `${comments} ${fundsTransferReceiverOrTransfer}`.trim();
const memo = comments ? `${comments} ${fundsTransferReceiverOrTransfer}` : fundsTransferReceiverOrTransfer;
return fundsTransferComment ? `${memo}: ${fundsTransferComment}` : memo;
}

Expand Down

0 comments on commit 46826a7

Please sign in to comment.