cache: false
})
.done(function(data) {
- var h = NETDATA.chartRegistry.fixid(host);
- //console.log('downloaded all charts from ' + host + ' (' + h + ')');
- self.charts[h] = data.charts;
+ if(data !== null) {
+ var h = NETDATA.chartRegistry.fixid(host);
+ //console.log('downloaded all charts from ' + host + ' (' + h + ')');
+ self.charts[h] = data.charts;
+ }
if(typeof callback === 'function')
callback(data);
})
var this_is_demo = null;
function isdemo() {
if(this_is_demo !== null) return this_is_demo;
- this_is_demo = document.location.hostname.endsWith('.firehol.org');
+ this_is_demo = false;
+
+ try {
+ if(typeof document.location.hostname === 'string')
+ this_is_demo = document.location.hostname.endsWith('.firehol.org');
+ }
+ catch(error) {
+ ;
+ }
+
return this_is_demo;
}