-
Notifications
You must be signed in to change notification settings - Fork 2k
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
TypeError: Cannot read property '0' of undefined #1250
Comments
It also barks with the same error when I move it all to a <div class="AddressTable">
<p>
<strong>Factuuradres</strong><br>
{{customer.name}}<br>
{{#each customer.address.parts as |part|}}
{{part}}{{#unless @last}}<br>{{/unless}}
{{/each}}
</p>
<p>
{{#unless order.isPickUp}}
<strong>Bezorgadres</strong><br>
{{#if order.delivery.companyName}}
{{order.delivery.companyName}}<br>
{{/if}}
{{order.delivery.name}}<br>
{{#each order.delivery.address.parts as |part|}}
{{part}}{{#unless @last}}<br>{{/unless}}
{{/each}}
{{/unless}}
</p>
</div> |
I have the same issue in my complex template. And I have found that in most cases this issue occurs when I have the "each" variable (in you case it is "part", named the same in at least 2 each cycles. Just try to change "part" in the second for each to something unique like "part2" or "item". I can't push a template here, because it very big, but here are some part of stack where problem occurs
blockParams is undefined |
Interesting, I'll give it a try, thanks. |
Looks like that #1187 this pull request fix the problem! |
@adamreisnz @olehyermokhin Since #1187 is part of 4.0.6, this should be fixed. Can you verify that? Would be great if we could close the issue. |
Have re-tested with the HTML structure as I had posted above and it seems to work ok now with 4.0.6 🎉 |
Great, thank you.
Am 31. Dezember 2016 02:23:21 MEZ, schrieb Adam Reis <[email protected]>:
…Closed #1250.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#1250 (comment)
|
I'm sorry for late feedback. I can also confirm that it works with 4.0.6. Thanks a lot! |
The latest release is v4.0.5 (20 Nov 16). Why is v4.0.6 behind? If I do the upgrade from v4.0.5 to v4.0.6 are there any missing features or different bugs? |
There actually is a 4.0.6, but it's not available from all source. And there are some issues with it. I'm currently talking to @wycats in order to get the necessary access rights to perform a release myself. Once I have them (and the necessary time), I want to publish 4.0.7 |
I get the following error when using
{{#unless @last}}<br>{{/unless}}
in aneach
block inside of a table structure, e.g.When I move the whole
unless
block out of the table, it works fine. If I wrap theunless
block in an additional<p>
tag inside of the '`, it also works. What's happening here?This is with 4.0.5 on Node 6.5.0
The text was updated successfully, but these errors were encountered: