mirror of
				https://github.com/bra1n/townsquare.git
				synced 2025-10-21 16:55:12 +00:00 
			
		
		
		
	fix list of locked votes showing unlocked votes sometimes
This commit is contained in:
		
							parent
							
								
									bc5aca1a8c
								
							
						
					
					
						commit
						9c3632e2ae
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		|  | @ -161,11 +161,13 @@ export default { | ||||||
|     }, |     }, | ||||||
|     voters: function() { |     voters: function() { | ||||||
|       const nomination = this.session.nomination[1]; |       const nomination = this.session.nomination[1]; | ||||||
|       const voters = this.session.votes.map((vote, index) => |       const voters = Array(this.players.length) | ||||||
|         vote ? this.players[index].name : "" |         .fill("") | ||||||
|  |         .map((x, index) => | ||||||
|  |           this.session.votes[index] ? this.players[index].name : "" | ||||||
|         ); |         ); | ||||||
|       const reorder = [ |       const reorder = [ | ||||||
|         ...voters.slice(nomination + 1, this.players.length), |         ...voters.slice(nomination + 1), | ||||||
|         ...voters.slice(0, nomination + 1) |         ...voters.slice(0, nomination + 1) | ||||||
|       ]; |       ]; | ||||||
|       return reorder.slice(0, this.session.lockedVote - 1).filter(n => !!n); |       return reorder.slice(0, this.session.lockedVote - 1).filter(n => !!n); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue