Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix footer links if the link is not set. #445

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/volto-light-theme/news/445.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed footerlinks error if the link is created but not set. @sneridagh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ const FooterLinks = (props: FooterLinksProps) => {
{!isEmpty(links?.blocks)
? links.blocks_layout.items.map((itemId) => {
const link = links.blocks[itemId];

if (isEmpty(link) || !link.href) return null;

const title = link.title || link.href[0]['title'];
const href = flattenToAppURL(link.href[0]['@id']);
const href = flattenToAppURL(link.href[0]?.['@id']);

if (!href) return null;

Expand Down
Loading