File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,21 +66,21 @@ export const CNavGroup = forwardRef<HTMLLIElement, CNavGroupProps>(
66
66
}
67
67
68
68
const onEntering = ( ) => {
69
- navItemsRef && navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
69
+ navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
70
70
}
71
71
72
72
const onEntered = ( ) => {
73
73
setHeight ( 'auto' )
74
74
}
75
75
76
76
const onExit = ( ) => {
77
- navItemsRef && navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
77
+ navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
78
78
}
79
79
80
80
const onExiting = ( ) => {
81
81
// @ts -expect-error reflow is necessary to get correct height of the element
82
82
// eslint-disable-next-line @typescript-eslint/no-unused-vars
83
- const reflow = navItemsRef && navItemsRef . current && navItemsRef . current . offsetHeight
83
+ const reflow = navItemsRef . current ? .offsetHeight
84
84
setHeight ( 0 )
85
85
}
86
86
You can’t perform that action at this time.
0 commit comments