summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2013-01-30 22:57:24 -0800
committerYehuda Katz <wycats@gmail.com>2013-01-30 22:57:24 -0800
commit448e43c41eaec473f3c6a27ad3a833a41f83f996 (patch)
tree27e16b3b0f25a13c5d54022668dbb5cfc72c25d4 /lib/handlebars/compiler/compiler.js
parentedb6f11b42a535746f994e45f78b0458799ca704 (diff)
parent6fe7f17c89574c419c530bd1cefc1509ef5dbff9 (diff)
downloadhandlebars.js-448e43c41eaec473f3c6a27ad3a833a41f83f996.zip
handlebars.js-448e43c41eaec473f3c6a27ad3a833a41f83f996.tar.gz
handlebars.js-448e43c41eaec473f3c6a27ad3a833a41f83f996.tar.bz2
Merge pull request #424 from wagenet/version-check-v2
Improved precompile template version check
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index b148bbb..e38f157 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -539,10 +539,7 @@ Handlebars.JavaScriptCompiler = function() {};
var source = this.mergeSource();
if (!this.isChild) {
- source = "if (Handlebars.VERSION !== '"+Handlebars.VERSION+"') {\n"+
- "throw 'Template was compiled with "+Handlebars.VERSION+", but runtime is '+Handlebars.VERSION;\n"+
- "}\n"+
- source;
+ source = "this.compiledVersion = '"+Handlebars.VERSION+"';\n"+source;
}
if (asObject) {