X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2FSettingToggle.vue;h=985ca84f8f0c6344fa01395b062c8a72eb9599d3;hb=e3bd2ecc2ca874270282c3c42813b8053d67dcbd;hp=864a497243df4e7685f427ef469ffb987ce495ab;hpb=5fa6b6cfa6b3010279ead23088add5c5664e8ac0;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]);