-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Detect invalid nested helpers in theme #94
Comments
If I'm understanding it correctly, this is a fairly general problem of accessing properties which don't exist inside the current context. {{#someObject}}
{{someProperty}} <!-- someObject.someProperty doesn't exist -->
{{/someObject}} I wasn't able to produce any errors using the example in the issue. @gargol are you reading this the same way? |
@kevinansfield my understanding is it's more about detecting usage of nested tags. In this situation it would be de detection of the following situation: {{#next_post}}
{{^prev_post}}
<p>no prev post</p>
{{/prev_post}}
<p>has next post</p>
{{/next_post}}
{{^prev_post}}
<p>no prev post</p>
{{/prev_post}} Where |
So I think there are a couple of things here...
Unfortunately the original issue is missing the context around what wasn't working or if any errors were encountered. As far as the rule for this is concerned, I'm not sure where to go. There are two options:
Detecting the logic error in the issue's original template would be a lot more difficult I think 🤔 |
Think we can introduce both rules as they would be quite helpful.
I think we could issue a warning for all of our async helpers when nested, similarly to what we already say in the docs already. My suspicion now is that this is exactly the problem the issue was about. Maybe @cobbspur you magically remember about the contexts of this issue?
This one just makes sense, as it would be invalid to use in any other context. |
Detect invalid nested helpers
Example:
The text was updated successfully, but these errors were encountered: