Merged in fix/book-453-linkconnection (pull request #2972)
fix(BOOK-453): avoid linkConnection invalid * fix(BOOK-453): avoid linkConnection invalid * test * test * test * Merge master
This commit is contained in:
@@ -87,7 +87,7 @@ export function getConnections({ content_page }: ContentPageRefs) {
|
||||
switch (block.__typename) {
|
||||
case ContentPageEnum.ContentStack.blocks.Accordion: {
|
||||
if (block.accordion.length) {
|
||||
connections.push(...block.accordion)
|
||||
connections.push(...block.accordion.filter((c) => !!c))
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export function getConnections({ content_page }: ContentPageRefs) {
|
||||
}
|
||||
case ContentPageEnum.ContentStack.blocks.Shortcuts: {
|
||||
if (block.shortcuts.shortcuts.length) {
|
||||
connections.push(...block.shortcuts.shortcuts)
|
||||
connections.push(...block.shortcuts.shortcuts.filter((c) => !!c))
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -124,7 +124,7 @@ export function getConnections({ content_page }: ContentPageRefs) {
|
||||
}
|
||||
case ContentPageEnum.ContentStack.blocks.UspGrid: {
|
||||
if (block.usp_grid.length) {
|
||||
connections.push(...block.usp_grid)
|
||||
connections.push(...block.usp_grid.filter((c) => !!c))
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -145,7 +145,7 @@ export function getConnections({ content_page }: ContentPageRefs) {
|
||||
switch (block.__typename) {
|
||||
case ContentPageEnum.ContentStack.sidebar.Content:
|
||||
if (block.content.length) {
|
||||
connections.push(...block.content)
|
||||
connections.push(...block.content.filter((c) => !!c))
|
||||
}
|
||||
break
|
||||
case ContentPageEnum.ContentStack.sidebar.JoinLoyaltyContact:
|
||||
@@ -165,7 +165,7 @@ export function getConnections({ content_page }: ContentPageRefs) {
|
||||
break
|
||||
case ContentPageEnum.ContentStack.sidebar.QuickLinks:
|
||||
if (block.shortcuts.shortcuts.length) {
|
||||
connections.push(...block.shortcuts.shortcuts)
|
||||
connections.push(...block.shortcuts.shortcuts.filter((c) => !!c))
|
||||
}
|
||||
break
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user