1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-10-01 04:27:40 +02:00

make sure uri has . in it before prefixing http

This commit is contained in:
Kyle Spearrin 2017-10-18 15:53:06 -04:00
parent 74eeb1a3c1
commit 23d1f076f4

View File

@ -43,13 +43,12 @@ angular
ctrl.icon = 'fa-apple';
ctrl.image = null;
}
else if (ctrl.imageEnabled && hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('http://') !== 0 &&
hostnameUri.indexOf('https://') !== 0) {
else if (ctrl.imageEnabled && hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('.') > -1) {
hostnameUri = "http://" + hostnameUri;
isWebsite = true;
}
else if (ctrl.imageEnabled) {
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > 0;
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > -1;
}
if (ctrl.imageEnabled && isWebsite) {