Skip to content

Commit

Permalink
Fix display of fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Jan 3, 2023
1 parent 118ae9f commit 7d2c1fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/SearchBlock/templates/FullView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function FullView(props) {
{},
...(mode === 'view'
? slotCombinations.map((blockId) => {
const fallbackId = `${blockId.split('-')[0]}-any`;
return {
[blockId]: (
<BlockContainer
Expand All @@ -51,8 +52,10 @@ function FullView(props) {
block={blockId}
mode={mode}
data={
slotFills?.[blockId] || mode === 'view'
? slotFills?.[`${blockId.split('-')[0]}-any`]
slotFills?.[blockId]
? slotFills?.[blockId]
: mode === 'view'
? slotFills?.[fallbackId]
: null
}
onChangeSlotfill={onChangeSlotfill}
Expand Down

0 comments on commit 7d2c1fa

Please sign in to comment.