Skip to content

Empty arrays not considered falsy #14

Open
@twolfson

Description

@twolfson

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: []})
''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions