Merge branch 'MDL-84076-MOODLE_405_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_405_STABLE
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -550,12 +550,14 @@ export default class Renderer {
|
||||
Renderer.getLoader().getTemplate(iconTemplate, themeName),
|
||||
]);
|
||||
|
||||
this.addHelpers(context, themeName);
|
||||
// Clone context object to avoid manipulating the original context object.
|
||||
const templateContext = {...context};
|
||||
this.addHelpers(templateContext, themeName);
|
||||
|
||||
// Render the template.
|
||||
const renderedContent = await mustache.render(
|
||||
templateSource,
|
||||
context,
|
||||
templateContext,
|
||||
// Note: The third parameter is a function that will be called to process partials.
|
||||
(partialName) => Renderer.getLoader().partialHelper(partialName, themeName),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user