Skip to content

Commit

Permalink
fix: fix event may not exist (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaiJi authored May 7, 2024
1 parent 8f441f2 commit 30c8e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/[organization]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function OrganizationDetail(props: {

const foramtedFirstEventTime = useMemo(() => {
const theBeginningEvent = events[events.length - 1];
if (theBeginningEvent.startDate) {
if (theBeginningEvent && theBeginningEvent.startDate) {
const date = new Date(theBeginningEvent.startDate);

return {
Expand Down

0 comments on commit 30c8e74

Please sign in to comment.