Skip to content

Commit

Permalink
fix: prevent undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Dec 12, 2024
1 parent 62cbf53 commit 40bd4fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/ComponentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ export const Implementations = ({ component, headingLevel }: ComponentPageSectio

export const HelpImproveComponent = ({ component }: ComponentPageSectionProps) => {
const DISCUSSION_URL_COLUMN_ID = 'PVTF_lADOBGdlVM4AdX8lzgcig7o';
const DiscussionUrl = component?.projects
.find((project) => project.id === 'HELP_WANTED')
.tasks.find((task) => task.id === DISCUSSION_URL_COLUMN_ID).value;
const project = component?.projects.find((project) => project.id === 'HELP_WANTED');
const DiscussionUrl = project?.tasks.find((task) => task.id === DISCUSSION_URL_COLUMN_ID).value;

return (
component && (
Expand Down

0 comments on commit 40bd4fd

Please sign in to comment.