Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Context.prototype.get doesn't support nested objects #176

Closed
kilianc opened this Issue · 3 comments

2 participants

@kilianc
var base = dust.makeBase({ a: { b: { c: 'foo' } } })
console.log(base.get('a.b.c')) // === undefined
console.log(base.get('a')) // === [object Object]
@vybs
Collaborator

try getPath for console.log(base.get('a.b.c'))

@kilianc
@vybs
Collaborator

AFAIK, when it sees a dot notation, it compiles to getPath.


{a.b.c}

function() {
dust.register("demo", body_0);

function body_0(chk, ctx) {
return chk.reference(ctx.getPath(false, ["a", "b", "c"]), ctx, "h");
}
return body_0;
})();

@vybs vybs closed this
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.