Minor fixes

This commit is contained in:
2022-01-08 22:48:04 +01:00
parent 2f19ba1948
commit 0f20a66cd2
6 changed files with 10 additions and 10 deletions

View File

@ -4,6 +4,10 @@ export const registerHandlebarsHelpers = function () {
return val == null;
});
Handlebars.registerHelper('exists', function (val) {
return val != null && val != undefined;
});
Handlebars.registerHelper('isEmpty', function (list) {
if (list) return list.length == 0;
else return 0;