Is there a way in Handlebars.js templating to check if the collection or list is null or empty, before going and iterating through the list/collection?
// if lis
If you want to check if a collection (cursor) is empty or not, the previous answers won't be useful, instead you must use the count() method :
count()
{{#if items.count}} There is {{items.count}} item(s). {{else}} There is nothing {{/if}}
There is {{items.count}} item(s).
There is nothing