TypeError: target.className.includes is not a function
When we click on Sidebar icon in core 4.0 admin template it will give this error
kindly describe me How can i fix this issue
TypeError: target.className.includes is not a function handleOnClick C:/Users/jagta/OneDrive/Documents/BRSOFTECH/USA JOBS/src/components/sidebar/CSidebar.tsx:128
125 | 126 | const handleOnClick = (event: Event) => { 127 | const target = event.target as HTMLAnchorElement
128 | target && | ^ 129 | target.className.includes('nav-link') && 130 | !target.className.includes('nav-group-toggle') && 131 | mobile &&
Before opening an issue:
- Search for duplicate or closed issues
- Prepare a reduced test case for any bugs
When asking general "how to" questions:
- Please do not open an issue here
When reporting a bug, include:
- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera, Android Browser)
- Reduced test cases and potential fixes using CodePen or JS Bin
When suggesting a feature, include:
- As much detail as possible for what we should add and why it's important to CoreUI Admin Template
- Relevant links to prior art, screenshots, or live demos whenever possible
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
this error shows, coz there is no class in your targeted element, when you click something svg which was wrapper by div and you write logic to wrapper div, but when you click you still targeted svg, and svg has no class, every class logic was in div wrapper