fix(Collapse): wrapperRef may be undefined (#9505)

This commit is contained in:
neverland
2021-09-17 20:50:14 +08:00
committed by GitHub
parent ce2a64012d
commit 826d4ab332
@@ -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();