From 8c9a7670c1dd5665324c08a713f75ed890d35266 Mon Sep 17 00:00:00 2001 From: OmarSoliman Date: Tue, 4 Feb 2020 14:17:52 +0200 Subject: [PATCH] Fix css_route_active issue --- src/Support/helpers.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Support/helpers.php b/src/Support/helpers.php index 18cbc62..d1ef3f9 100644 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -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; } }