Skip to content

Commit

Permalink
Fix css_route_active issue
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarSoliman15 committed Feb 4, 2020
1 parent b30c072 commit 8c9a767
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ function css_route_active($route, $className = 'active', $conditions = [])
}

foreach ($conditions as $key => $value) {
if (request($key) == $value) {
return Route::currentRouteName() == $route ? $className : '';
if (request($key) != $value) {
return;
}
}

return $className;
}
}

Expand Down

0 comments on commit 8c9a767

Please sign in to comment.