Skip to content
Snippets Groups Projects
Commit 1677f28f authored by Rob Sherwood's avatar Rob Sherwood
Browse files

topology ui: more error checking

parent 19a9223e
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,8 @@ window.TopologyView = Backbone.View.extend({
for (var i = 0; i < this.hosts.length; i++) {
host = this.hosts[i];
if ('ip' in host.attributes['network-addresses'][0]) {
if (( host.attributes['network-addresses'].length > 0 ) &&
('ip' in host.attributes['network-addresses'][0])) {
host.name = host.attributes['network-addresses'][0]['ip'] + "\n" + host.id;
} else {
host.name = host.id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment