Got a weird problem here with Meteor, Blaze and Spacebars. Here's my setup: I have a helper that returns an array [8,8,8,8,8,0,0]
. But when I print it out in my template with {{#each hours}}{{this}}{{/each}}
, I get the following order: [8,0,8,8,8,8,0]
.
Why is this happening, am I missing something?
Additionally, when I print out the {{hours}} in the template without the each
loop, I get the right order.
UPD: For @zim: here's my helper:
hours() {
return [8,8,8,8,8,0,0];
}
And the template is pretty much that I described in the post:
{{#each hours}}
{{this}}
{{/each}}
Oddly, it's working fine today. I have no idea what it was, but will get back to this topic whenever I experience this problem again.