Skip to content

Commit 4955a80

Browse files
committed
fix broken backer banner
1 parent 992f4a7 commit 4955a80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/theme/BackerBanner/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async function getBackers() {
5151
avatarUrl
5252
} = backer.sponsor;
5353
// It is in US cents
54-
const monthlyAmount = (backer.tier.amountDonated / 100);
54+
const monthlyAmount = backer.tier ? (backer.tier.amountDonated / 100) : 0;
5555

5656
let href;
5757
if (githubHandle) {
@@ -68,7 +68,7 @@ async function getBackers() {
6868
key: href,
6969
src: avatarUrl,
7070
alt: usersName,
71-
title: `Thank you ${usersName} for the $${monthlyAmount}/month!`,
71+
title: monthlyAmount ? `Thank you ${usersName} for the $${monthlyAmount}/month!` : 'Thank you ${usersName} for the support!',
7272
href: href,
7373
};
7474
});

0 commit comments

Comments
 (0)