diff --git a/frontend/src/Editor/Container.jsx b/frontend/src/Editor/Container.jsx index 7c0a8de387..0bac6ff30e 100644 --- a/frontend/src/Editor/Container.jsx +++ b/frontend/src/Editor/Container.jsx @@ -7,7 +7,7 @@ import { DraggableBox } from './DraggableBox'; import { snapToGrid as doSnapToGrid } from './snapToGrid'; import update from 'immutability-helper'; import { componentTypes } from './Components/components'; -import { computeComponentName } from '@/_helpers/utils'; +import { computeComponentName, resolveReferences } from '@/_helpers/utils'; import useRouter from '@/_hooks/use-router'; import Comments from './Comments'; import { commentsService } from '@/_services'; @@ -201,7 +201,6 @@ export const Container = ({ }, }, }); - return undefined; }, }), @@ -437,8 +436,7 @@ export const Container = ({ const box = boxes[key]; const canShowInCurrentLayout = box.component.definition.others[currentLayout === 'mobile' ? 'showOnMobile' : 'showOnDesktop'].value; - - if (!box.parent && canShowInCurrentLayout) { + if (!box.parent && resolveReferences(canShowInCurrentLayout, currentState)) { return (