diff --git a/web/pages/home.tsx b/web/pages/home.tsx index f429cb29..e7fb31cf 100644 --- a/web/pages/home.tsx +++ b/web/pages/home.tsx @@ -71,11 +71,15 @@ const Home = (props: { const user = useUser() - const contracts = useContracts() ?? props.activeContracts + const initialActiveContracts = props.activeContracts ?? [] + + const contracts = useContracts() const recentComments = useRecentComments() - const activeContracts = recentComments - ? findActiveContracts(contracts, recentComments) - : props.activeContracts + + const activeContracts = + recentComments && contracts + ? findActiveContracts(contracts, recentComments) + : initialActiveContracts if (user === null) { Router.replace('/')