mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-09-21 18:08:51 +03:00
fixes missing helper
closes #521 - changes handlebars default missing helper function to log error instead of throwing error
This commit is contained in:
parent
fafead5718
commit
fbe44a041c
@ -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 once the template-driven helpers have loaded
|
||||||
return when.join(
|
return when.join(
|
||||||
navHelper,
|
navHelper,
|
||||||
|
Loading…
Reference in New Issue
Block a user