Fixed GUI pulsing due to PORT_STATS_UPDATE event.
Change-Id: I18b7e8b300f0af6f6cbf453f346808bb1c6d0d3c
diff --git a/web/gui/src/main/webapp/app/view/topo/topoForce.js b/web/gui/src/main/webapp/app/view/topo/topoForce.js
index 7910ee0..0bc0d5c 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoForce.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js
@@ -263,17 +263,19 @@
online = ldata.online(),
delay = immediate ? 0 : 1000;
- // TODO: understand why el is sometimes undefined on addLink events...
- el.classed('link', true);
- el.classed('inactive', !online);
- el.classed(allLinkTypes, false);
- if (type) {
- el.classed(type, true);
+ // FIXME: understand why el is sometimes undefined on addLink events...
+ if (el) {
+ el.classed('link', true);
+ el.classed('inactive', !online);
+ el.classed(allLinkTypes, false);
+ if (type) {
+ el.classed(type, true);
+ }
+ el.transition()
+ .duration(delay)
+ .attr('stroke-width', linkScale(lw))
+ .attr('stroke', linkConfig[th].baseColor);
}
- el.transition()
- .duration(delay)
- .attr('stroke-width', linkScale(lw))
- .attr('stroke', linkConfig[th].baseColor);
}
function removeLinkElement(d) {