Skip to content

Commit

Permalink
JI-6344 Fix incorrect contentData relayed to children (#167)
Browse files Browse the repository at this point in the history
You can't copy or use the same contentData on children, then
isRoot() will evalute to true for them as well + other evil
stuff. Now using the same impl. as Column
  • Loading branch information
icc authored Oct 24, 2024
1 parent cf59561 commit f875949
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/scripts/pagecontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,7 @@ class PageContent extends H5P.EventDispatcher {
const columnNode = document.createElement('div');

const instanceContentData = {
...contentData,
metadata: {
...contentData.metadata,
},
parent: self,
previousState: (previousState) ? previousState.chapters[i].state : {}
};
const newInstance = H5P.newRunnable(config.chapters[i], contentId, undefined, undefined, instanceContentData);
Expand Down

0 comments on commit f875949

Please sign in to comment.