summaryrefslogtreecommitdiff
path: root/ext/js/templates/template-renderer.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/templates/template-renderer.js')
-rw-r--r--ext/js/templates/template-renderer.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/js/templates/template-renderer.js b/ext/js/templates/template-renderer.js
index 07b2849c..e27ad03c 100644
--- a/ext/js/templates/template-renderer.js
+++ b/ext/js/templates/template-renderer.js
@@ -28,6 +28,7 @@ class TemplateRenderer {
this._helpersRegistered = false;
this._stateStack = null;
this._dataTypes = new Map();
+ this._requirements = null;
}
registerDataType(name, {modifier=null, composeData=null}) {
@@ -85,10 +86,14 @@ class TemplateRenderer {
_renderTemplate(instance, data) {
try {
+ const requirements = [];
this._stateStack = [new Map()];
- return instance(data).trim();
+ this._requirements = requirements;
+ const result = instance(data).trim();
+ return {result, requirements};
} finally {
this._stateStack = null;
+ this._requirements = null;
}
}