File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 {{ else if gt .CanVote 1 }}
1616 <div id= " cannot-vote" class= " alert alert-warning fade show d-flex flex-row align-items-center" role= " alert" >
1717 <h5 class= " m-0" >
18- You are not eligible to vote in this poll. This is likely because you are not an Active Member,
18+ You are not eligible to vote in this poll. This is likely because you are not an Active Member,
1919 or because you did not meet the gatekeep requirements by the time the poll opened.
2020 If you believe this is an error, please contact Evals or Opcomm.
2121 </h5>
8282
8383 eventSource.addEventListener (" {{ .Id }}" , function (event) {
8484 let data = JSON.parse (event.data );
85- for (let option in data) {
86- let count = data[option];
85+ if (data.length == 0) return;
86+ let results = data[0];
87+ for (let option in results) {
88+ let count = results[option];
8789 let element = document.getElementById (option);
8890 if (element == null) {
8991 let newElement = document.createElement (" div" );
You can’t perform that action at this time.
0 commit comments