mirror of
https://github.com/youzan/vant.git
synced 2026-05-06 01:00:26 +08:00
fix(Collapse): wrapperRef may be undefined (#9505)
This commit is contained in:
@@ -91,7 +91,9 @@ export default defineComponent({
|
||||
|
||||
// use double raf to ensure animation can start
|
||||
doubleRaf(() => {
|
||||
wrapperRef.value!.style.height = value ? contentHeight : '0';
|
||||
if (wrapperRef.value) {
|
||||
wrapperRef.value.style.height = value ? contentHeight : '0';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
onTransitionEnd();
|
||||
|
||||
Reference in New Issue
Block a user