Skip to content

Commit

Permalink
Refactor: use Array.includes instead of indexOf (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored and pranavrajs committed Dec 15, 2019
1 parent a7cb75e commit 5c7c325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/dashboard/components/layout/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5c7c325

Please sign in to comment.