Repository: incubator-trafficcontrol Updated Branches: refs/heads/master 89a6ed117 -> 567167fc6
[TC-131] Check to see if the CRConfig is not null prior to trying to access data within the structure. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/7230ba88 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/7230ba88 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/7230ba88 Branch: refs/heads/master Commit: 7230ba88c17990c154e822ff66578220e433a2a4 Parents: 89a6ed1 Author: Jeff Elsloo <jeffrey_els...@cable.comcast.com> Authored: Thu Feb 2 13:38:17 2017 -0700 Committer: Dave Neuman <neu...@apache.org> Committed: Fri Feb 3 11:15:32 2017 -0700 ---------------------------------------------------------------------- traffic_monitor/etc/ats_sim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7230ba88/traffic_monitor/etc/ats_sim.js ---------------------------------------------------------------------- diff --git a/traffic_monitor/etc/ats_sim.js b/traffic_monitor/etc/ats_sim.js index e2535c3..73e1d94 100644 --- a/traffic_monitor/etc/ats_sim.js +++ b/traffic_monitor/etc/ats_sim.js @@ -252,7 +252,7 @@ function getData(request) { ret.ats["proxy.process.cache.volume_1.bytes_used"] = v1_bytes_used; ret.ats["proxy.process.cache.volume_1.bytes_total"] = v1_bytes_total; - if (server_name in cr_config.contentServers) { + if (cr_config && cr_config.contentServers && server_name in cr_config.contentServers) { if (debug) console.log("Attempting to build stats for " + server_name); for (var delivery_service in cr_config.contentServers[server_name]['deliveryServices']) {