Switch: fix toggling value error (#19473)

Co-authored-by: Edwin Betancourt <EdwinBetanc0urt@hotmail.com>
pull/21503/head^2
Edwin Betancourt 2022-01-04 05:51:58 -04:00 committed by GitHub
parent 55bac06f0f
commit 473ef53f93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -134,7 +134,9 @@
this.$nextTick(() => {
// 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() {