Refactor: use Array.includes instead of indexOf (#366)
This commit is contained in:
parent
a7cb75e468
commit
5c7c325c9c
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ export default {
|
||||||
for (let i = 0; i < groupKey.length; i += 1) {
|
for (let i = 0; i < groupKey.length; i += 1) {
|
||||||
const groupItem = this.sidebarList[groupKey[i]];
|
const groupItem = this.sidebarList[groupKey[i]];
|
||||||
// Check if current route is included
|
// Check if current route is included
|
||||||
const isRouteIncluded = groupItem.routes.indexOf(currentRoute) > -1;
|
const isRouteIncluded = groupItem.routes.includes(currentRoute);
|
||||||
if (isRouteIncluded) {
|
if (isRouteIncluded) {
|
||||||
menuItems = Object.values(groupItem.menuItems);
|
menuItems = Object.values(groupItem.menuItems);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue