mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
return results even when domain is not parsable
This commit is contained in:
@@ -33,12 +33,6 @@ angular
|
|||||||
}
|
}
|
||||||
|
|
||||||
domain = utilsService.getDomain(url);
|
domain = utilsService.getDomain(url);
|
||||||
if (!domain) {
|
|
||||||
$timeout(function () {
|
|
||||||
$scope.loaded = true;
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
chrome.tabs.sendMessage(tabs[0].id, {
|
chrome.tabs.sendMessage(tabs[0].id, {
|
||||||
command: 'collectPageDetails',
|
command: 'collectPageDetails',
|
||||||
|
|||||||
@@ -263,7 +263,11 @@ function initCipherService() {
|
|||||||
CipherService.prototype.getAllDecryptedForDomain = function (domain, includeOtherTypes) {
|
CipherService.prototype.getAllDecryptedForDomain = function (domain, includeOtherTypes) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var eqDomainsPromise = self.settingsService.getEquivalentDomains().then(function (eqDomains) {
|
if (!domain && !includeOtherTypes) {
|
||||||
|
return Q([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var eqDomainsPromise = !domain ? Q([]) : self.settingsService.getEquivalentDomains().then(function (eqDomains) {
|
||||||
var matchingDomains = [];
|
var matchingDomains = [];
|
||||||
for (var i = 0; i < eqDomains.length; i++) {
|
for (var i = 0; i < eqDomains.length; i++) {
|
||||||
if (eqDomains[i].length && eqDomains[i].indexOf(domain) >= 0) {
|
if (eqDomains[i].length && eqDomains[i].indexOf(domain) >= 0) {
|
||||||
@@ -284,7 +288,7 @@ function initCipherService() {
|
|||||||
ciphersToReturn = [];
|
ciphersToReturn = [];
|
||||||
|
|
||||||
for (var i = 0; i < ciphers.length; i++) {
|
for (var i = 0; i < ciphers.length; i++) {
|
||||||
if (ciphers[i].type === self.constantsService.cipherType.login && ciphers[i].login.domain &&
|
if (domain && ciphers[i].type === self.constantsService.cipherType.login && ciphers[i].login.domain &&
|
||||||
matchingDomains.indexOf(ciphers[i].login.domain) > -1) {
|
matchingDomains.indexOf(ciphers[i].login.domain) > -1) {
|
||||||
ciphersToReturn.push(ciphers[i]);
|
ciphersToReturn.push(ciphers[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user