Reputation: 6658
Some is a block helper that returns the block if the callback returns true for some value in the given array.
{{#some array isString}}
Render me if the array has a string.
{{else}}
Render me if it doesn't.
{{/some}}
//=> 'Render me if the array has a string.'
How do I define the callback in a a stencil theme
Upvotes: 1
Views: 298
Reputation: 2153
In a Stencil theme, the callback function would need to be a helper that exists in Stencil, rather than a function you define. We'll update the docs to note that the callback must be a pre-existing helper.
Upvotes: 1