diff --git a/src/course-home/outline-tab/LmsHtmlFragment.jsx b/src/course-home/outline-tab/LmsHtmlFragment.jsx index 7ac2d783..d2db4071 100644 --- a/src/course-home/outline-tab/LmsHtmlFragment.jsx +++ b/src/course-home/outline-tab/LmsHtmlFragment.jsx @@ -28,7 +28,9 @@ export default function LmsHtmlFragment({ const iframe = useRef(null); function resetIframeHeight() { - iframe.current.height = iframe.current.contentWindow.document.body.scrollHeight; + if (iframe.current) { + iframe.current.height = iframe.current.contentWindow.document.body.scrollHeight; + } } useEffect(() => {