Empty string fallbacks? #139

Closed
krazyjakee opened this Issue Mar 22, 2013 · 1 comment

3 participants

@krazyjakee

I read the documentation and presume this is not a feature. If not, I'm quite surprised nobody has mentioned it before.

Let's say I want to render {{name}} but the name value is false. So I want it to render "No Name" as a fallback. I would be expected to include something along the lines of...

{{name}}No Name{{/name}}

Am I missing something?

@uglymunky

You've probably long resolved this by now but just in case:

{{^name}}No Name{{/name}}

Ref: Check out the "Inverted Sections" section of the Mustache docs

@sayrer sayrer closed this Aug 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment