Skip to content

Helpers don't support . syntax #14

Closed
stonecobra opened this Issue Mar 10, 2011 · 1 comment

2 participants

@stonecobra

When I push a native object onto the stack, I can navigate with dot syntax, for example:
{user.FirstName}
If I make user a helper function, like this in dust.makeBase:
user: function(chunk, context){
var req = context.get('req');
return req.session.user;
}
and then try the same, it doesn't work:
{user.FirstName}
but this does work:
{#user}{FirstName}{/user}

Am I doing something wrong?

@akdubya
Owner
akdubya commented Apr 21, 2011

Nope. Dot syntax is intended to allow convenient access to plain nested objects.

@akdubya akdubya closed this Apr 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.