Fix method name in error message

- compile -> precompile
This commit is contained in:
Ryunosuke SATO
2013-02-16 20:14:38 +09:00
parent 75a4f0d931
commit 261a2deb51
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1229,7 +1229,7 @@ Handlebars.JavaScriptCompiler = function() {};
Handlebars.precompile = function(input, options) {
if (!input || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
}
options = options || {};
+1 -1
View File
@@ -1364,7 +1364,7 @@ test("bug reported by @fat where lambdas weren't being properly resolved", funct
test("Passing falsy values to Handlebars.compile throws an error", function() {
shouldThrow(function() {
CompilerContext.compile(null);
}, "You must pass a string or Handlebars AST to Handlebars.compile. You passed null");
}, "You must pass a string or Handlebars AST to Handlebars.precompile. You passed null");
});
test('GH-408: Multiple loops fail', function() {