From fbe44a041c4f3f17fe0073fb69b8736672f60692 Mon Sep 17 00:00:00 2001 From: cobbspur Date: Sun, 25 Aug 2013 15:16:02 +0100 Subject: [PATCH] fixes missing helper closes #521 - changes handlebars default missing helper function to log error instead of throwing error --- core/server/helpers/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/server/helpers/index.js b/core/server/helpers/index.js index 93857493b1..08ca7cc689 100644 --- a/core/server/helpers/index.js +++ b/core/server/helpers/index.js @@ -284,6 +284,12 @@ coreHelpers = function (ghost) { }); }); + ghost.registerThemeHelper('helperMissing', function (arg) { + if (arguments.length === 2) { + return undefined; + } + errors.logError("Missing helper: '" + arg + "'"); + }); // Return once the template-driven helpers have loaded return when.join( navHelper,