I have a for loop that I want to include a template view in:
table.blade:
#game
h1= table.name
-if( table.playerSitting() )
a.btn.btn-danger.stand(href="#") Stand
#table
-for (var i=0; i<7;i++)
include 'seat' exposing i
seat.blade:
- id = 'p' + (i+1)
div(id="#{id}")
-if (table.hasAt(i))
p= table.usernameAt(i)
-else
-if( !table.playerSitting() )
a.btn.btn-inverse.sit(href="#", data-key="#{i}") Sit
-else
p
When I first load the view, everything draws fine. But if I sit or stand, or go to another table, I get this:
Exception from Deps recompute: Error: Can't create second landmark in same branch
at /home/thomporter/meteor/blackjack/views/table.blade:8:4
6 | #table
7 | -for (var i=0; i<7;i++)
8 > include 'seat' exposing i
9 |
10 |
I figure I can fix this by creating a "seats" collection that stores the user id & table ids, but that seems silly. I'm currently using an array property of the table called "players", index 0-6 for each seat... at least, that's the idea. =)
I should also mention I replaced seat.blade with:
p hi
and no luck, same issues.
Any ideas?
Edit
Version Information:
Meteorite version 0.4.9
Meteor version 0.5.9 (git checkout)
Blade 3.0.3