Skip to content

Commit 5477499

Browse files
committed
fix bug that could cause rendering subscription list to crash
1 parent 0c66ce6 commit 5477499

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/packages/frontend/purchases/subscriptions.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,11 @@ export default function Subscriptions() {
480480
dataIndex: "cost",
481481
key: "cost",
482482
render: (cost, record) => {
483-
if (record.status == "active") {
483+
// in prod we hit a case where cost was null, hence the if here.
484+
if (record.status == "active" && cost != null) {
484485
return `${currency(round2up(cost))}/${record.interval}`;
486+
} else {
487+
return "-";
485488
}
486489
},
487490
},

0 commit comments

Comments
 (0)