From 5086fe70170eed396c6e3e228d0e5c7840e4cbba Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 11 Oct 2024 15:21:48 +0800 Subject: [PATCH] feat: add isNull helper --- .../core/client/src/schema-component/common/utils/uitls.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/client/src/schema-component/common/utils/uitls.tsx b/packages/core/client/src/schema-component/common/utils/uitls.tsx index 67cdf25ab0..cb281ce3b3 100644 --- a/packages/core/client/src/schema-component/common/utils/uitls.tsx +++ b/packages/core/client/src/schema-component/common/utils/uitls.tsx @@ -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 {