diff --git a/core/core-frontend/src/custom-component/de-screen/Component.vue b/core/core-frontend/src/custom-component/de-screen/Component.vue index ebc5b0b1c9..04161dd049 100644 --- a/core/core-frontend/src/custom-component/de-screen/Component.vue +++ b/core/core-frontend/src/custom-component/de-screen/Component.vue @@ -326,8 +326,10 @@ const calcTabLength = () => { const containerDom = document.getElementById( 'tab-' + element.value.propValue[element.value.propValue.length - 1].name ) - tabsAreaScroll.value = - containerDom.parentNode.clientWidth > tabComponentRef.value.clientWidth - 100 + if (containerDom) { + tabsAreaScroll.value = + containerDom?.parentNode?.clientWidth > tabComponentRef.value.clientWidth - 100 + } } else { tabsAreaScroll.value = false } diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index eae0c84325..fab16cd76a 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -323,8 +323,10 @@ const calcTabLength = () => { const containerDom = document.getElementById( 'tab-' + element.value.propValue[element.value.propValue.length - 1].name ) - tabsAreaScroll.value = - containerDom.parentNode.clientWidth > tabComponentRef.value.clientWidth - 100 + if (containerDom) { + tabsAreaScroll.value = + containerDom?.parentNode?.clientWidth > tabComponentRef.value.clientWidth - 100 + } } else { tabsAreaScroll.value = false }