@cryptotaxi247 / netdata-1 / commits / 74701fed5

prevent a javascript error when the registry is not accesible #561

Costa Tsaousis (ktsaou) committed Jun 17, 2016 at 22:13 UTC 74701fed5429170a63165fecbab459408e1dacc9
1 file changed +2 -2
web/dashboard.js
+2 -2
@@ -5649,7 +5649,7 @@
5649 NETDATA.registry.access(max_redirects - 1, callback);
5650 }
5651 else {
5652 - if(typeof data.person_guid === 'string')
5652 + if(data !== null && typeof data.person_guid === 'string')
5653 NETDATA.registry.person_guid = data.person_guid;
5654
5655 if(typeof callback === 'function')
@@ -5688,7 +5688,7 @@
5688 callback(null);
5689 });
5690 },
5691 -
5691 +
5692 switch: function(new_person_guid, callback) {
5693 // impersonate
5694 $.ajax({