Allow empty route for navigation entries

Navigation entries might be handled by javascript, as the about section
from https://github.com/nextcloud/firstrunwizard/pull/64 so we don't
need a route for that.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-05-24 16:27:56 +02:00
parent fd4a7bf72a
commit 354c6e95d5
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ class NavigationManager implements INavigationManager {
$id = isset($nav['id']) ? $nav['id'] : $app; $id = isset($nav['id']) ? $nav['id'] : $app;
$order = isset($nav['order']) ? $nav['order'] : 100; $order = isset($nav['order']) ? $nav['order'] : 100;
$type = isset($nav['type']) ? $nav['type'] : 'link'; $type = isset($nav['type']) ? $nav['type'] : 'link';
$route = $this->urlGenerator->linkToRoute($nav['route']); $route = $nav['route'] !== '' ? $this->urlGenerator->linkToRoute($nav['route']) : '';
$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
foreach ([$icon, "$app.svg"] as $i) { foreach ([$icon, "$app.svg"] as $i) {
try { try {