This commit is contained in:
Steffen 2020-04-22 23:13:59 +02:00
parent 2df32af266
commit 7d8c8878ff
No known key found for this signature in database
GPG Key ID: 764D74E98267DFC6
1 changed files with 8 additions and 2 deletions

View File

@ -236,8 +236,14 @@ export default {
firstNight.sort();
otherNight.sort();
newPlayers.forEach(player => {
player.firstNight = Math.max(firstNight.indexOf(player.role.firstNight), 0);
player.otherNight = Math.max(otherNight.indexOf(player.role.otherNight), 0);
player.firstNight = Math.max(
firstNight.indexOf(player.role.firstNight),
0
);
player.otherNight = Math.max(
otherNight.indexOf(player.role.otherNight),
0
);
});
localStorage.players = JSON.stringify(
newPlayers.map(player => ({