-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle the potential absence of events #7091
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Lighthouse Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -12,7 +12,7 @@ import styles from './calendar.module.css'; | |||
type GroupedEntries = Record<string, Array<CalendarEvent>>; | |||
|
|||
const UpcomingMeetings: FC = async () => { | |||
const events = await getCalendarEvents(CALENDAR_NODEJS_ID); | |||
const events = (await getCalendarEvents(CALENDAR_NODEJS_ID)) ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this, could you update the getCalendarEvents
function to handle the undefined scenario?
Description
Resolves #7090
Validation
Open http://localhost:3000/en/about/get-involved/events locally and see no errors. CI for this PR should now also pass.
Related Issues
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.