From f17244c3461a714c27fdcfd2d1ad240796fea02e Mon Sep 17 00:00:00 2001 From: Johnson Cherian Date: Thu, 21 Dec 2023 11:51:00 +0530 Subject: [PATCH] fix: fixed issue that caused items dropped to mobile disappear --- frontend/src/Editor/DragContainer.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/Editor/DragContainer.jsx b/frontend/src/Editor/DragContainer.jsx index 600986c1ec..01cc6b8c64 100644 --- a/frontend/src/Editor/DragContainer.jsx +++ b/frontend/src/Editor/DragContainer.jsx @@ -78,10 +78,10 @@ export default function DragContainer({ const childMoveableRefs = useRef([]); const [movableTargets, setMovableTargets] = useState({}); const boxList = boxes - .filter( - (box) => - box?.component?.definition?.others[currentLayout === 'mobile' ? 'showOnMobile' : 'showOnDesktop'].value === - '{{true}}' + .filter((box) => + ['{{true}}', true].includes( + box?.component?.definition?.others[currentLayout === 'mobile' ? 'showOnMobile' : 'showOnDesktop'].value + ) ) .map((box) => ({ id: box.id,