summaryrefslogtreecommitdiffstats
path: root/dist/handlebars.runtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/handlebars.runtime.js')
-rw-r--r--dist/handlebars.runtime.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/dist/handlebars.runtime.js b/dist/handlebars.runtime.js
index 13d0c78..0a023ea 100644
--- a/dist/handlebars.runtime.js
+++ b/dist/handlebars.runtime.js
@@ -249,12 +249,17 @@ Handlebars.VM = {
}
},
programWithDepth: Handlebars.VM.programWithDepth,
- noop: Handlebars.VM.noop
+ noop: Handlebars.VM.noop,
+ compiledVersion: null
};
return function(context, options) {
options = options || {};
- return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
+ var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
+ if (container.compiledVersion !== Handlebars.VERSION) {
+ throw "Template was compiled with "+(container.compiledVersion || 'unknown version')+", but runtime is "+Handlebars.VERSION;
+ }
+ return result;
};
},