Fix a bug in team page

This commit is contained in:
Ari Timonen 2020-03-17 04:19:34 +02:00
parent 78a089bc86
commit 04dc76b632

View file

@ -18,7 +18,7 @@
<div class="controls inline">
<%= f.submit "Request To Join", class: 'button' %>
</div>
<% elsif cuser.teamers.joining.first.team != @team %>
<% elsif cuser.teamers.joining.first&.team&. != @team %>
<div class="controls inline">
<%= f.submit "Request To Join", class: 'button', data: { confirm: "You have already requested to join #{cuser.teamers.joining.first.team}. Do you want to request to join #{@team} instead?" } %>
</div>