Use an empty array if this does not exist (#30322)
This commit is contained in:
parent
7c49336a8d
commit
e6cefc3d03
|
@ -83,7 +83,7 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, $injector) =
|
|||
if (!scope.cluster) {
|
||||
const $route = $injector.get('$route');
|
||||
const globalState = $injector.get('globalState');
|
||||
scope.cluster = $route.current.locals.clusters.find(cluster => cluster.cluster_uuid === globalState.cluster_uuid);
|
||||
scope.cluster = ($route.current.locals.clusters || []).find(cluster => cluster.cluster_uuid === globalState.cluster_uuid);
|
||||
}
|
||||
|
||||
function getSetupObj() {
|
||||
|
|
Loading…
Reference in a new issue