1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00
This commit is contained in:
Kyle Spearrin
2018-06-07 23:36:39 -04:00
parent 8211e19db0
commit f40451ecc5
5 changed files with 23 additions and 7 deletions

View File

@@ -11,6 +11,8 @@ import { StateService } from '../../abstractions/state.service';
import { ConstantsService } from '../../services/constants.service';
import { Utils } from '../../misc/utils';
@Component({
selector: 'app-vault-icon',
templateUrl: 'icon.component.html',
@@ -77,8 +79,7 @@ export class IconComponent implements OnChanges {
if (this.imageEnabled && isWebsite) {
try {
const url = new URL(hostnameUri);
this.image = this.iconsUrl + '/' + url.hostname + '/icon.png';
this.image = this.iconsUrl + '/' + Utils.getHostname(hostnameUri) + '/icon.png';
this.fallbackImage = 'images/fa-globe.png';
} catch (e) { }
}