From bb25afab06a0f5b742183ed26e91ed8bf99d9d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Tue, 12 Nov 2024 12:28:14 -0300 Subject: [PATCH 1/2] fix: error while loading iframe on mfe Unit Outline --- cms/static/js/views/pages/container_subviews.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cms/static/js/views/pages/container_subviews.js b/cms/static/js/views/pages/container_subviews.js index b32c86ae8dec..223fde98ef89 100644 --- a/cms/static/js/views/pages/container_subviews.js +++ b/cms/static/js/views/pages/container_subviews.js @@ -506,9 +506,13 @@ function($, _, gettext, BaseView, ViewUtils, XBlockViewUtils, MoveXBlockUtils, H }, renderTagElements: function(tags, depth, parentId) { + /* This function updates the tags in the sidebar of the legacy Unit Outline Page. + * It is not used in the mfe version of the Unit Outline. */ + const parentElement = document.querySelector(`.content-tags-${parentId}`); + if (!parentElement) return; + const tagListElement = this; tags.forEach(function(tag) { - const parentElement = document.querySelector(`.content-tags-${parentId}`); var tagContentElement = document.createElement('div'), tagValueElement = document.createElement('span'); From 69ee02699f254afa9f1e892e9fe022497a5428f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Fri, 15 Nov 2024 10:58:06 -0300 Subject: [PATCH 2/2] docs: improve docstring Co-authored-by: Jillian --- cms/static/js/views/pages/container_subviews.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/static/js/views/pages/container_subviews.js b/cms/static/js/views/pages/container_subviews.js index 223fde98ef89..cfb47c7cd895 100644 --- a/cms/static/js/views/pages/container_subviews.js +++ b/cms/static/js/views/pages/container_subviews.js @@ -506,8 +506,8 @@ function($, _, gettext, BaseView, ViewUtils, XBlockViewUtils, MoveXBlockUtils, H }, renderTagElements: function(tags, depth, parentId) { - /* This function updates the tags in the sidebar of the legacy Unit Outline Page. - * It is not used in the mfe version of the Unit Outline. */ + /* This function displays the tags in the sidebar of the legacy Unit Outline Page. + * It is not used when the Authoring MFE iframes a component in the Unit Outline. */ const parentElement = document.querySelector(`.content-tags-${parentId}`); if (!parentElement) return;