Use an empty array if this does not exist (#30322)

This commit is contained in:
Chris Roberson 2019-02-13 15:54:21 -05:00 committed by GitHub
parent 7c49336a8d
commit e6cefc3d03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {