From 74701fed5429170a63165fecbab459408e1dacc9 Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Fri, 17 Jun 2016 22:13:23 +0300 Subject: [PATCH] prevent a javascript error when the registry is not accesible #561 --- web/dashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/dashboard.js b/web/dashboard.js index 18fd5b0f..f0bc53ad 100644 --- a/web/dashboard.js +++ b/web/dashboard.js @@ -5649,7 +5649,7 @@ NETDATA.registry.access(max_redirects - 1, callback); } else { - if(typeof data.person_guid === 'string') + if(data !== null && typeof data.person_guid === 'string') NETDATA.registry.person_guid = data.person_guid; if(typeof callback === 'function') @@ -5688,7 +5688,7 @@ callback(null); }); }, - + switch: function(new_person_guid, callback) { // impersonate $.ajax({ -- 2.39.2