Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 2dc7461

Browse files
committed
fix unfound index
- when page is avail in one lang but not the other
1 parent c4b6ae9 commit 2dc7461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/NavigationTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected function routeLink($name, $code)
131131
if (!$searchCode) {
132132
switch (config('simpleMenu.unFoundLocalizedRoute')) {
133133
case 'error':
134-
return $name;
134+
return '404';
135135
break;
136136
default:
137137
return '/';
@@ -146,7 +146,7 @@ protected function searchForRoute($name, $code)
146146
$routesListFile = include $this->listFileDir;
147147

148148
// check if we have a link according to that "routeName & code"
149-
return $routesListFile[$name][$code] ?: false;
149+
return array_get($routesListFile, "$name.$code", false);
150150
}
151151

152152
/**

0 commit comments

Comments
 (0)