Skip to content

Commit

Permalink
fix: error while loading iframe on mfe Unit Outline [FC-0062] (#35828)
Browse files Browse the repository at this point in the history
On the Course unit page after merging the PR with new iframe for xblocks, an issue with infinite loading of the iframe appeared if the unit/xblock has tags. This PR solves the problem with the error that appeared. Addition and processing of the tagging functionality is planned in future PRs.
  • Loading branch information
rpenido authored Nov 15, 2024
1 parent 7adecb4 commit cb1e6ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cms/static/js/views/pages/container_subviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,13 @@ function($, _, gettext, BaseView, ViewUtils, XBlockViewUtils, MoveXBlockUtils, H
},

renderTagElements: function(tags, depth, parentId) {
/* 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;

const tagListElement = this;
tags.forEach(function(tag) {
const parentElement = document.querySelector(`.content-tags-${parentId}`);
var tagContentElement = document.createElement('div'),
tagValueElement = document.createElement('span');

Expand Down

0 comments on commit cb1e6ee

Please sign in to comment.