[bug] fix external icons

This commit is contained in:
Andrea 2022-01-02 20:45:06 +01:00
parent 467ff637ae
commit 01d1d5dbb4
1 changed files with 3 additions and 3 deletions

View File

@ -22,15 +22,15 @@
return this.valueParts.length > 1 ? this.valueParts[0] : this.set;
},
iconSource() {
if (this.v.startsWith('https://')) {
return this.v;
}
if (this.v.endsWith('.svg')) {
return `/img/${this.inverse ? this.v.replace('.svg', '-inverse.svg') : this.v}`;
}
if (this.v.endsWith('.png')) {
return `/img/${this.inverse ? this.v.replace('.png', '-inverse.png') : this.v}`;
}
if (this.v.startsWith('https://')) {
return this.v;
}
return null;
},
},