From 33b53ef9893938ac2d38b78f548d8bc13642215c Mon Sep 17 00:00:00 2001 From: Mark Christian Date: Mon, 19 Oct 2015 09:44:53 -0700 Subject: Use template string :sparkles: for error message and double-quotes for quoting partial name --- lib/handlebars/base.js | 2 +- spec/partials.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index def1d3e..cf3084e 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -51,7 +51,7 @@ HandlebarsEnvironment.prototype = { extend(this.partials, name); } else { if (typeof partial === 'undefined') { - throw new Exception('Attempting to register a partial called `' + name + '` as undefined'); + throw new Exception(`Attempting to register a partial called "${name}" as undefined`); } this.partials[name] = partial; } diff --git a/spec/partials.js b/spec/partials.js index 839157e..d3ead74 100644 --- a/spec/partials.js +++ b/spec/partials.js @@ -103,7 +103,7 @@ describe('partials', function() { shouldThrow(function() { var undef; handlebarsEnv.registerPartial('undefined_test', undef); - }, Handlebars.Exception, 'Attempting to register a partial called `undefined_test` as undefined'); + }, Handlebars.Exception, 'Attempting to register a partial called "undefined_test" as undefined'); }); it('rendering template partial in vm mode throws an exception', function() { -- cgit v1.1