fixing bug where a script that includes all travellers leaves the other travellers tab empty, the tabs now check if there is any other travelers before displaying the tabs.

This commit is contained in:
Dave 2021-01-25 16:09:53 +00:00
parent db8f23a572
commit bddd1f94bd
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
: "bluffing"
}}
</h3>
<ul class="tokens" v-if="tab === 'editionRoles'">
<ul class="tokens" v-if="tab === 'editionRoles' || !otherTravelers.size">
<li
v-for="role in availableRoles"
:class="[role.team]"
@ -18,7 +18,7 @@
<Token :role="role" />
</li>
</ul>
<ul class="tokens" v-if="tab === 'otherTravelers'">
<ul class="tokens" v-if="tab === 'otherTravelers' && otherTravelers.size">
<li
v-for="role in otherTravelers.values()"
:class="[role.team]"
@ -28,7 +28,7 @@
<Token :role="role" />
</li>
</ul>
<div class="button-group" v-if="playerIndex >= 0">
<div class="button-group" v-if="playerIndex >= 0 && otherTravelers.size">
<span
class="button"
:class="{ townsfolk: tab === 'editionRoles' }"