Skip to content

Commit

Permalink
fix(@dpc-sdp/nuxt-ripple): 🐛 handle missing menus better
Browse files Browse the repository at this point in the history
  • Loading branch information
dylankelly committed Oct 23, 2024
1 parent dcf1ef0 commit 1640612
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 1640612

Please sign in to comment.