diff --git a/src/Distilleries/Expendable/Http/Middleware/RedirectIfAuthenticated.php b/src/Distilleries/Expendable/Http/Middleware/RedirectIfAuthenticated.php index 2d62434..ba29d16 100644 --- a/src/Distilleries/Expendable/Http/Middleware/RedirectIfAuthenticated.php +++ b/src/Distilleries/Expendable/Http/Middleware/RedirectIfAuthenticated.php @@ -45,7 +45,7 @@ public function handle($request, Closure $next) $menu = $this->config->get('expendable.menu'); $user = $this->auth->user(); - if (method_exists($user, 'getFirstRedirect')) + if (method_exists($user, 'getFirstRedirect') && !empty($menu) && !empty($menu['left'])) { return new RedirectResponse($this->auth->user()->getFirstRedirect($menu['left'])); }