1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00

fix(Radio): icon ref may be undefined ()

This commit is contained in:
neverland 2021-09-17 19:41:44 +08:00 committed by GitHub
parent 8d0f120dde
commit ce2a64012d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,7 +71,7 @@ export default defineComponent({
const onClick = (event: MouseEvent) => {
const { target } = event;
const icon = iconRef.value;
const iconClicked = icon === target || icon!.contains(target as Node);
const iconClicked = icon === target || icon?.contains(target as Node);
if (!disabled.value && (iconClicked || !props.labelDisabled)) {
emit('toggle');