minstache icon indicating copy to clipboard operation
minstache copied to clipboard

Empty arrays not considered falsy

Open twolfson opened this issue 10 years ago • 0 comments

There is a divergence from the mustache spec for inverted sections with respect to empty arrays. minstache seems to be handling them as an iterator, not as an inverted section

https://github.com/janl/mustache.js/blob/0.8.2/README.md#inverted-sections

> require('mustache').render('{{^places}}none{{/places}}', {places: []})
'none'
> require('minstache')('{{^places}}none{{/places}}', {places: []})
''

twolfson avatar Oct 05 '14 21:10 twolfson