-
Notifications
You must be signed in to change notification settings - Fork 638
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
Can't use loop var "class" with asyncEach #743
Comments
Is the include inside a loop? Make sure you use the |
I've tested templates both with for and asyncEach, no difference beetwen them. |
possibly related to #372? |
I've found the reason. {% for class in json %} - works in sync mode So the name "class" used as loop variable works in the sync and fails in async mode. I've changed it and the template is OK now. |
This still seems like a bug that ideally would be fixed, if your analysis of the problem is correct. |
We've used {% include %} not only for templates, but also to insert SVG to HTML -
{% include "img/face" + user.face + ".svg" %}
It worked fine until we switched nunjucks to async mode. Here's our simple loader:
It works, generally, we can see 'NunjucksLoader loaded ' messages in the browser console. But SVG content won't appear on the resulting HTML. Included templates are fine, but included SVGs aren't.
Is there any fix for that?
The text was updated successfully, but these errors were encountered: