diff --git a/x-pack/plugins/monitoring/public/directives/elasticsearch/shard_allocation/transformers/indices_by_nodes.js b/x-pack/plugins/monitoring/public/directives/elasticsearch/shard_allocation/transformers/indices_by_nodes.js index 79f3a995097e..c9ec0acaae91 100644 --- a/x-pack/plugins/monitoring/public/directives/elasticsearch/shard_allocation/transformers/indices_by_nodes.js +++ b/x-pack/plugins/monitoring/public/directives/elasticsearch/shard_allocation/transformers/indices_by_nodes.js @@ -33,7 +33,7 @@ export function indicesByNodes() { // If the node is null then it's an unassigned shard and we need to // add it to the unassigned array. - if (shard.node === null) { + if (!shard.node || (shard.node === null)) { obj[index].unassigned.push(shard); // if the shard is a primary we need to set the unassignedPrimaries flag if (shard.primary) {