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

This commit is contained in:
Chris Roberson 2019-02-13 22:14:41 -05:00 committed by GitHub
parent 8bad6adc30
commit 41eebe6747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config, $inj
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() {