diff --git a/apps/admin-x-settings/src/utils/IframeBuffering.tsx b/apps/admin-x-settings/src/utils/IframeBuffering.tsx index 0e7b3c136a..d3860ca0d7 100644 --- a/apps/admin-x-settings/src/utils/IframeBuffering.tsx +++ b/apps/admin-x-settings/src/utils/IframeBuffering.tsx @@ -60,8 +60,7 @@ const IframeBuffering: React.FC = ({generateContent, class }, [visibleIframeIndex, iframes]); useEffect(() => { - const invisibleIframeIndex = visibleIframeIndex === 0 ? 1 : 0; - const iframe = iframes[invisibleIframeIndex].current; + const iframe = iframes[visibleIframeIndex].current; if (iframe) { iframe.contentWindow?.scrollTo(0, scrollPosition);