瀏覽代碼

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>
Julius Härtl 6 年之前
父節點
當前提交
354c6e95d5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/private/NavigationManager.php

+ 1 - 1
lib/private/NavigationManager.php

@@ -289,7 +289,7 @@ class NavigationManager implements INavigationManager {
 				$id = isset($nav['id']) ? $nav['id'] : $app;
 				$order = isset($nav['order']) ? $nav['order'] : 100;
 				$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';
 				foreach ([$icon, "$app.svg"] as $i) {
 					try {