Skip to content

Commit

Permalink
🐞 Login error for voters (#409) (#411)
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 89b88be commit 2b654fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion avRegistration/auth-method-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ angular.module('avRegistration')
var tokens = [];
if (credentialsStr) {
var credentials = JSON.parse(credentialsStr);
tokens = credentials.map(function (credential) { return credential.token; });
tokens = credentials
.map(function (credential) { return credential.token; })
.filter(function (token) { return !!token;});
return tokens;
}
if (isAdmin && $http.defaults.headers.common.Authorization) {
Expand Down
2 changes: 2 additions & 0 deletions dist/appCommon-vmaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist
var credentialsStr = $window.sessionStorage.getItem("vote_permission_tokens"), tokens = [];
return credentialsStr ? JSON.parse(credentialsStr).map(function(credential) {
return credential.token;
}).filter(function(token) {
return !!token;
}) : (isAdmin && $http.defaults.headers.common.Authorization && tokens.push($http.defaults.headers.common.Authorization),
tokens);
}(halfLifes);
Expand Down

0 comments on commit 2b654fb

Please sign in to comment.