Skip to content

Commit 618fbe7

Browse files
committed
fix(CSidebar): change className.includes to target.classList.contains in handleOnCLick
1 parent b584416 commit 618fbe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/sidebar/CSidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ export const CSidebar = forwardRef<HTMLDivElement, CSidebarProps>(
126126
const handleOnClick = (event: Event) => {
127127
const target = event.target as HTMLAnchorElement
128128
target &&
129-
target.className.includes('nav-link') &&
130-
!target.className.includes('nav-group-toggle') &&
129+
target.classList.contains('nav-link') &&
130+
!target.classList.contains('nav-group-toggle') &&
131131
mobile &&
132132
handleHide()
133133
}

0 commit comments

Comments
 (0)