1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-25 17:32:46 +01:00

cleaned providers should be an obj, not array

This commit is contained in:
Kyle Spearrin 2017-09-09 12:25:35 -04:00
parent 2b6d7ec361
commit d9981e1d71

View File

@ -117,18 +117,18 @@ angular
}
var keys = Object.keys(twoFactorProviders);
var cleanedProviders = [];
for (var i = 0; i < keys.length; i++) {
var provider = $filter('filter')(constants.twoFactorProviderInfo, {
type: keys[i],
active: true,
requiresUsb: false
});
if (provider.length) {
cleanedProviders.push(twoFactorProviders[keys[i]]);
if (!provider.length) {
delete twoFactorProviders[keys[i]];
}
}
return cleanedProviders;
return twoFactorProviders;
}
// ref: https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser