Skip to content

Commit

Permalink
🐞 Login error for voters (#465) (#467)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#1832
  • Loading branch information
Findeton authored Sep 5, 2024
1 parent d9fc01a commit 7500d64
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions avBooth/booth-directive/booth-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ angular.module('avBooth')
return scope.state !== stateEnum.errorScreen && scope.state !== stateEnum.successScreen;
}
var demoStartTime = Date.now();
scope.startTimeMs = demoStartTime;

// Try to read and process voting credentials
function readVoteCredentials() {
Expand Down Expand Up @@ -733,10 +734,7 @@ angular.module('avBooth')
currentElectionCredentials = _.find(
scope.credentials,
function (electionCredential) {
return (
electionCredential.electionId.toString() === scope.electionId ||
(electionCredential.electionId - 1).toString() === scope.electionId
);
return electionCredential.electionId.toString() === scope.electionId && !!electionCredential.token;
}
);
} catch (error) {
Expand Down

0 comments on commit 7500d64

Please sign in to comment.