File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,8 @@ public function parse($file) {
226226 */
227227 private function isNavigationItem ($ data ): bool {
228228 // Allow settings navigation items with no route entry
229- if ($ data ['type ' ] === 'settings ' ) {
229+ $ type = $ data ['type ' ] ?? 'link ' ;
230+ if ($ type === 'settings ' ) {
230231 return isset ($ data ['name ' ]);
231232 }
232233 return isset ($ data ['name ' ], $ data ['route ' ]);
Original file line number Diff line number Diff line change @@ -305,11 +305,9 @@ private function init() {
305305 if (!isset ($ nav ['name ' ])) {
306306 continue ;
307307 }
308- if (!isset ($ nav ['route ' ])) {
309- // Allow settings navigation items with no route entry, all other types require one
310- if ($ nav ['type ' ] !== 'settings ' ) {
311- continue ;
312- }
308+ // Allow settings navigation items with no route entry, all other types require one
309+ if (!isset ($ nav ['route ' ]) && $ nav ['type ' ] !== 'settings ' ) {
310+ continue ;
313311 }
314312 $ role = isset ($ nav ['@attributes ' ]['role ' ]) ? $ nav ['@attributes ' ]['role ' ] : 'all ' ;
315313 if ($ role === 'admin ' && !$ this ->isAdmin ()) {
You can’t perform that action at this time.
0 commit comments