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>(
6666 }
6767
6868 const onEntering = ( ) => {
69- navItemsRef && navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
69+ navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
7070 }
7171
7272 const onEntered = ( ) => {
7373 setHeight ( 'auto' )
7474 }
7575
7676 const onExit = ( ) => {
77- navItemsRef && navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
77+ navItemsRef . current && setHeight ( navItemsRef . current . scrollHeight )
7878 }
7979
8080 const onExiting = ( ) => {
8181 // @ts -expect-error reflow is necessary to get correct height of the element
8282 // eslint-disable-next-line @typescript-eslint/no-unused-vars
83- const reflow = navItemsRef && navItemsRef . current && navItemsRef . current . offsetHeight
83+ const reflow = navItemsRef . current ? .offsetHeight
8484 setHeight ( 0 )
8585 }
8686
You can’t perform that action at this time.
0 commit comments