Open rbrv opened 4 years ago
Hi @rbrv, this is a limitation in the Melody parser (separate project). I cannot give an ETA for a fix, but issues like that can be worked around by doing something like
{%- for purchasable in product.getVariants() -%}
{% set optionDisabled = not purchasable.isAvailable ? 'disabled' : '' %}
<option {{ optionDisabled }}>
...
</option>
{%- endfor -%}
Does this help you for now?
I understand. We can change to code as you proposed. Thanks for the follow-up!
Ran into the same issue, confirming that the work around does its job for now.
Trying to implement it inside the PrestaShop repository for our twig files, since we've a bunch of stuff already done, we can't use a workaround like setting the var before :/
What would it take to fix this?
@twbartel Is there an issue open for this in the parser project? I looked for one and couldn't find it. Did I miss it or has no issue been opened yet?
@twbartel Do you have any update on this? This makes porting an existing code base over pretty annoying ...
Update The ternary operator works.
<li class="page-item {{ 'current' in page.class ? ' active' }}">
Got this error while testing:
Error
Source file
.prettierrc