Merge pull request #442 from tricknotes/fix-method-name-in-error-message

Fix method name in error message
This commit is contained in:
Kevin Decker
2013-02-16 14:01:31 -08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1226,7 +1226,7 @@ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
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
@@ -1370,7 +1370,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() {