diff --git a/layout-webapp/src/main/webapp/vue-app/common/js/ApplicationUtils.js b/layout-webapp/src/main/webapp/vue-app/common/js/ApplicationUtils.js index 4054fa12e..eb630e675 100644 --- a/layout-webapp/src/main/webapp/vue-app/common/js/ApplicationUtils.js +++ b/layout-webapp/src/main/webapp/vue-app/common/js/ApplicationUtils.js @@ -201,6 +201,10 @@ export function handleApplicationContent(applicationContent, applicationElement) const newHtmlDocument = document.createElement('div'); newHtmlDocument.innerHTML = newBodyContent; const portletContent = newHtmlDocument.querySelector('.UIWorkingWorkspace .PORTLET-FRAGMENT'); + if (!portletContent) { + applicationElement.classList.add('hidden'); + return; + } const oldPortletContent = applicationElement.querySelector('.PORTLET-FRAGMENT'); if (oldPortletContent) { oldPortletContent.remove();