mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Collapse): wrapperRef may be undefined (#9505)
This commit is contained in:
parent
ce2a64012d
commit
826d4ab332
@ -91,7 +91,9 @@ export default defineComponent({
|
|||||||
|
|
||||||
// use double raf to ensure animation can start
|
// use double raf to ensure animation can start
|
||||||
doubleRaf(() => {
|
doubleRaf(() => {
|
||||||
wrapperRef.value!.style.height = value ? contentHeight : '0';
|
if (wrapperRef.value) {
|
||||||
|
wrapperRef.value.style.height = value ? contentHeight : '0';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
onTransitionEnd();
|
onTransitionEnd();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user