Skip to content

Commit

Permalink
ZEUS-2201: Invoice: handle descriptions/memos returned as arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed May 21, 2024
1 parent 8800627 commit 0762e87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/Invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export default class Invoice extends BaseModel {
}

@computed public get getMemo(): string {
return this.memo || this.description;
const memo = this.memo || this.description;
if (typeof memo === 'string') return memo;
if (Array.isArray(memo)) return memo[0];
return '';
}

@computed public get isPaid(): boolean {
Expand Down

0 comments on commit 0762e87

Please sign in to comment.