feat: add isNull helper

This commit is contained in:
chenos 2024-10-11 15:21:48 +08:00
parent 1d0947beea
commit 5086fe7017

View File

@ -197,6 +197,10 @@ Handlebars.registerHelper('dateFormat', (date, format, tz) => {
return dayjs(date).format(format);
});
Handlebars.registerHelper('isNull', (value) => {
return _.isNull(value);
});
export async function getRenderContent(templateEngine, content, variables, localVariables, defaultParse) {
if (content && templateEngine === 'handlebars') {
try {