X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2FSettingToggle.vue;h=985ca84f8f0c6344fa01395b062c8a72eb9599d3;hb=e3bd2ecc2ca874270282c3c42813b8053d67dcbd;hp=ffc91a1c041d3fc34bef14b53b5b669661cfa95a;hpb=da6e676d6e42bb3e9a9feb212e152904330cff10;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/src/components/SettingToggle.vue b/src/components/SettingToggle.vue index ffc91a1..985ca84 100644 --- a/src/components/SettingToggle.vue +++ b/src/components/SettingToggle.vue @@ -1,6 +1,6 @@ @@ -15,13 +15,12 @@ export default { }, data: function () { return { + secondaryIcon: null, value: true, }; }, created: function () { - if (!this.iconAlt) { - this.iconAlt = this.icon; - } + this.secondaryIcon = this.iconAlt || this.icon; if (this.name in localStorage) { this.value = JSON.parse(localStorage[this.name]);