X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2FSettingToggle.vue;h=985ca84f8f0c6344fa01395b062c8a72eb9599d3;hb=37dfd2a132d883482b330b22a7c19d86948a391c;hp=94655bcab19aa06eb33dc54e93b4456e2720b26b;hpb=b9c5fcf085bed9c6100283133531b36bfbb06cf0;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/src/components/SettingToggle.vue b/src/components/SettingToggle.vue index 94655bc..985ca84 100644 --- a/src/components/SettingToggle.vue +++ b/src/components/SettingToggle.vue @@ -1,7 +1,6 @@ @@ -16,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]);