Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikeesto
Copy link
Member

@mikeesto mikeesto commented Oct 6, 2024

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

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@mikeesto mikeesto requested a review from a team as a code owner October 6, 2024 10:52
Copy link

vercel bot commented Oct 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Oct 6, 2024 10:53am

Copy link

github-actions bot commented Oct 6, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 100 🟢 92 🔗

Copy link

github-actions bot commented Oct 6, 2024

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.47% (589/651) 76.29% (177/232) 94.35% (117/124)

Unit Test Report

Tests Skipped Failures Errors Time
131 0 💤 0 ❌ 0 🔥 5.359s ⏱️

Copy link
Contributor

@AugustinMauroy AugustinMauroy left a 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)) ?? [];
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error fetching calendar events
4 participants