mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
Refactor: use Array.includes instead of indexOf (#366)
This commit is contained in:
committed by
Pranav Raj S
parent
a7cb75e468
commit
5c7c325c9c
@@ -103,7 +103,7 @@ export default {
|
||||
for (let i = 0; i < groupKey.length; i += 1) {
|
||||
const groupItem = this.sidebarList[groupKey[i]];
|
||||
// Check if current route is included
|
||||
const isRouteIncluded = groupItem.routes.indexOf(currentRoute) > -1;
|
||||
const isRouteIncluded = groupItem.routes.includes(currentRoute);
|
||||
if (isRouteIncluded) {
|
||||
menuItems = Object.values(groupItem.menuItems);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user