Fix method name in error message
- compile -> precompile
This commit is contained in:
@@ -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
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user