diff options
author | Ryunosuke SATO <tricknotes.rs@gmail.com> | 2013-02-16 20:14:38 +0900 |
---|---|---|
committer | Ryunosuke SATO <tricknotes.rs@gmail.com> | 2013-02-16 20:14:38 +0900 |
commit | 261a2deb51ce5dffdbe374fa2a231c9bea108025 (patch) | |
tree | a3e60848590e2eabf7ae49fead9c3c4167ad194c | |
parent | 75a4f0d9317709e00f5c84b6b9d8cc4241f26d84 (diff) | |
download | handlebars.js-261a2deb51ce5dffdbe374fa2a231c9bea108025.zip handlebars.js-261a2deb51ce5dffdbe374fa2a231c9bea108025.tar.gz handlebars.js-261a2deb51ce5dffdbe374fa2a231c9bea108025.tar.bz2 |
Fix method name in error message
- compile -> precompile
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 2 | ||||
-rw-r--r-- | spec/qunit_spec.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 8400804..0260a41 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -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 || {}; diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js index 5953bca..db7f956 100644 --- a/spec/qunit_spec.js +++ b/spec/qunit_spec.js @@ -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() { |