New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use {#} inside of {@select} due to lost context #50
Comments
Please remove the internal link. It's meaningless on github. Also please simplify example to highlight the issue |
Sorry about that. I updated my OP and cleaned up the code a bit. It's an extremely simplified version of the code I was working with. |
This is actually the same as #9 and #42. Possible fixes:
|
The latest dust release is out there now. 2.0.0 and has the path change |
sethkinast
pushed a commit
to sethkinast/dustjs-helpers
that referenced
this issue
Dec 11, 2014
- Must be contained in a {@select} block - Renders its body if any truth test inside the {@select} block evaluates to true - Can be included multiple times inside a {@select} block. As part of this change, {@select} no longer clobbers the current context, so keys that begin with a dot work inside a {@select}. This closes LinkedInAttic#9, closes LinkedInAttic#42, closes LinkedInAttic#50, and closes LinkedInAttic#79.
Merged
sethkinast
pushed a commit
to sethkinast/dustjs-helpers
that referenced
this issue
Dec 13, 2014
- Must be contained in a {@select} block - Renders its body if any truth test inside the {@select} block evaluates to true - Can be included multiple times inside a {@select} block. As part of this change, {@select} no longer clobbers the current context, so keys that begin with a dot work inside a {@select}. This closes LinkedInAttic#9, closes LinkedInAttic#42, closes LinkedInAttic#50, and closes LinkedInAttic#79.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example code:
Dust:
When trying to iterate using
{#}
within a{@select}
block, the context appears to be lost. The iteration simply does not happen, even though the JSON object exists and is valid.The object ({emails} in the example) when printed is perfectly fine and valid.
However when the current context is dumped within one of the
{@eq}
blocks, all that is outputted is:JSON:
This leads me to believe the current context is lost and thus the iteration doesn't happen. Removing the
{@select}
block makes everything work properly.The text was updated successfully, but these errors were encountered: