summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/runtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/runtime.js')
-rw-r--r--lib/handlebars/runtime.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js
index a7a9103..5c479a8 100644
--- a/lib/handlebars/runtime.js
+++ b/lib/handlebars/runtime.js
@@ -129,7 +129,7 @@ export function template(templateSpec, env) {
function ret(context, options = {}) {
let data = options.data;
- ret._setup(options);
+ _setup(options);
if (!options.partial && templateSpec.useData) {
data = initData(context, data);
}
@@ -151,7 +151,7 @@ export function template(templateSpec, env) {
}
ret.isTop = true;
- ret._setup = function(options) {
+ function _setup(options) {
if (!options.partial) {
container.helpers = container.merge(options.helpers, env.helpers);
@@ -166,18 +166,8 @@ export function template(templateSpec, env) {
container.partials = options.partials;
container.decorators = options.decorators;
}
- };
-
- ret._child = function(i, data, blockParams, depths) {
- if (templateSpec.useBlockParams && !blockParams) {
- throw new Exception('must pass block params');
- }
- if (templateSpec.useDepths && !depths) {
- throw new Exception('must pass parent depths');
- }
+ }
- return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
- };
return ret;
}