Skip to content

Commit

Permalink
fixed issue in resolveComponentRef and resolveComponentNavigation whe…
Browse files Browse the repository at this point in the history
…n there is no navigation
  • Loading branch information
dgomezg committed Jun 7, 2024
1 parent ad702e4 commit 4bc23f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers/resolveComponentNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = (components, componentName, contentName) => {

if (components[componentName]) {
var component = components[componentName]
if (contentName) {
if (contentName && component.latest.navigation) {
var contentMenu = findContentInNavigation(component.latest.navigation, contentName)
if (contentMenu) resolvedNav = contentMenu
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/resolveComponentReference.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = (components, componentName, contentName) => {

if (components[componentName]) {
var component = components[componentName]
if (contentName) {
if (contentName && component.latest.navigation) {
var contentMenu = findContentInNavigation(component.latest.navigation, contentName)
resolvedUrl = contentMenu.url ? contentMenu.url : '#'
} else {
Expand Down

0 comments on commit 4bc23f7

Please sign in to comment.