Skip to content

Commit

Permalink
Merge pull request #1356 from dpc-sdp/feaeture/fix-missing-menu
Browse files Browse the repository at this point in the history
[SD-430] 🐛 handle missing menus better
  • Loading branch information
dylankelly authored Oct 23, 2024
2 parents ee0d3c8 + 1640612 commit a4e2836
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export const map = async (src, tidePageApi: TidePageApi) => {

// Finally, this site data will contain a reference to the menu we need to fetch
const menuData = siteData.field_site_main_menu

// if a menu is deleted Drupal returns an id of 'missing'
if (menuData?.id === 'missing') {
return null
}
const menu = await tidePageApi.getSiteMenu(
tidePageApi.site,
menuData,
Expand Down

0 comments on commit a4e2836

Please sign in to comment.