Skip to content

Commit

Permalink
fix null value
Browse files Browse the repository at this point in the history
  • Loading branch information
renemennab committed Jun 27, 2024
1 parent 5352bcb commit da11556
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/data/getSiteSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type Solution = {
title?: string | null
}

export const getSiteSettings = (solutions: Solution[]) => ({
export const getSiteSettings = (solutions?: Solution[]) => ({
og_description:
'Open-source application deployment, faster than ever without sacrificing compliance."',
partner_logos: {
Expand Down Expand Up @@ -214,9 +214,11 @@ function getProductSubnav() {
}))
}

function getSolutionSubnav(solutions: Solution[]) {
function getSolutionSubnav(solutions?: Solution[]) {
if (!solutions || !solutions.length) return undefined

return solutions.map((solution, i) => ({
id: solution.slug,
id: solution.slug || '',
link: {
id: `${solution.slug}-${i}`,
title: solution.title,
Expand Down

0 comments on commit da11556

Please sign in to comment.