Skip to content

Commit

Permalink
fix: ElemeFE#17602 el-switch when toggling the value causes it to be …
Browse files Browse the repository at this point in the history
…destroyed
  • Loading branch information
Edwin Betancourt authored and Edwin Betancourt committed May 22, 2020
1 parent bf534d9 commit e3b195b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/switch/src/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
// set input's checked property
// in case parent refuses to change component's value
this.$refs.input.checked = this.checked;
if (this.$refs.input) {
this.$refs.input.checked = this.checked;
}
});
},
setBackgroundColor() {
Expand Down

0 comments on commit e3b195b

Please sign in to comment.