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.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js
index 72f2e0d..2b9f474 100644
--- a/lib/handlebars/runtime.js
+++ b/lib/handlebars/runtime.js
@@ -69,6 +69,12 @@ export function template(templateSpec, env) {
// Just add water
var container = {
+ strict: function(obj, name) {
+ if (!(name in obj)) {
+ throw new Exception('"' + name + '" not defined in ' + obj);
+ }
+ return obj[name];
+ },
lookup: function(depths, name) {
var len = depths.length;
for (var i = 0; i < len; i++) {