From 9e7e2bbde64274f0916070bddcdc5654cea77296 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 25 Jul 2022 17:18:26 -0700 Subject: [PATCH] Use null instead of undefined --- web/pages/charity/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index dd5653fc..0c970a42 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -38,7 +38,7 @@ export async function getStaticProps() { const matches = quadraticMatches(txns, totalRaised) const numDonors = uniqBy(txns, (txn) => txn.fromId).length const donorId = last(txns)?.fromId - const mostRecentDonor = donorId ? await getUser(donorId) : undefined + const mostRecentDonor = donorId ? await getUser(donorId) : null return { props: { @@ -91,7 +91,7 @@ export default function Charity(props: { matches: { [charityId: string]: number } txns: Txn[] numDonors: number - mostRecentDonor?: User + mostRecentDonor?: User | null }) { const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props