diff --git a/packages/core/src/components/cms/RenderSections.tsx b/packages/core/src/components/cms/RenderSections.tsx index f1291318aa..b8a9795bd9 100644 --- a/packages/core/src/components/cms/RenderSections.tsx +++ b/packages/core/src/components/cms/RenderSections.tsx @@ -62,14 +62,18 @@ export const LazyLoadingSection = ({ }) => { const { cart: displayCart, modal: displayModal } = useUI() if (SECTIONS_OUT_OF_VIEWPORT.includes(sectionName)) { - if (debug) { - console.log(`section SECTIONS_OUT_OF_VIEWPORT '${sectionName}' VISIBLE`) - } const shouldLoad = isInteractive || (sectionName === 'CartSidebar' && displayCart) || (sectionName === 'RegionModal' && displayModal) + if (debug) { + console.log( + `section SECTIONS_OUT_OF_VIEWPORT '${sectionName}' shouldLoad:`, + shouldLoad + ) + } + return shouldLoad ? <>{children} : null }