-
Notifications
You must be signed in to change notification settings - Fork 472
Open
Milestone
Description
When giving a partial parameters, they are pushed down the stack and the previous context is pushed onto head. If there are two variables with the same name, then the partial parameter will be hidden by the higher context.
This is confusing default behaviour and seems inconsistent to how sections operate.
I'm aware of the changes introduced by #132 - but this seems like a hack to fix the issue of not searching a higher context ( #271 ).
See example below. Expect x=2, but it is x=1.
dust.loadSource(dust.compile("partial says x={x}", "part"));
dust.loadSource(dust.compile("{>part x=\"2\" /}", "test"));
var data = {
x :1
};
dust.render("test", data, function(err, out) {
$("body").html(out);
});
Metadata
Metadata
Assignees
Labels
No labels