Skip to content

Commit

Permalink
fixes missing helper
Browse files Browse the repository at this point in the history
closes TryGhost#521

- changes handlebars default missing helper function to log error instead of throwing error
  • Loading branch information
cobbspur committed Aug 25, 2013
1 parent fafead5 commit fbe44a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/server/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fbe44a0

Please sign in to comment.