X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2FSettingToggle.vue;h=985ca84f8f0c6344fa01395b062c8a72eb9599d3;hb=2662b1704930eff56a61194a6796d463df687889;hp=864a497243df4e7685f427ef469ffb987ce495ab;hpb=9814a037a5158d31c77fecc8bfb3b61b45d015b3;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/src/components/SettingToggle.vue b/src/components/SettingToggle.vue index 864a497..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]);