You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…biguous cases
MustacheExpressions generate a `get` opcode in cases where the identifier is statically found in their scope, but fall back to `maybeLocal` otherwise to disambiguate at compile time whether they are being invoked inside a partial or not.
PathExpressions however did not go through this path, always using a `get` opcode even in cases that were ambiguous. This caused any PathExpression inside a partial to fail when inheriting an identifier from the outside scope.
This commit changes the PathExpression compiler to generate a `maybeLocal` opcode in the ambiguous case instead of a `get`.
Related Issues
Steps to reproduce
When you use a
{{#if valueOfParentContext}}
statement in a partial the value getsundefined
.For example:
Expected result
The rendered Template should be
Author: Dennis!
.Actual result
The rendered Template is
No author!
.Comments
I've added a failing test.
The text was updated successfully, but these errors were encountered: