Skip to content

Commit

Permalink
fix(@dpc-sdp/ripple-tide-api): add optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
David Featherston committed Sep 22, 2023
1 parent 43ea5ef commit 0f84540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ripple-tide-api/src/services/lib/site-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ const getHierarchicalMenu = function (menu, activeUrl, enabledCheck = false) {
text: link.attributes.title,
url:
link.attributes?.url ||
link.attributes.link.url ||
link.attributes.link.uri,
link.attributes.link?.url ||
link.attributes.link?.uri,
id: link.id.replace(/^(menu_link_content:)/, ''),
parent: link.attributes.parent
? link.attributes.parent.replace(/^(menu_link_content:)/, '')
Expand Down

0 comments on commit 0f84540

Please sign in to comment.