fixed local node null geo angular error

This commit is contained in:
Marian Oancea 2015-02-05 17:21:22 +02:00
parent 427b04c607
commit c7d1144f1b
2 changed files with 5 additions and 4 deletions

4
app.js
View File

@ -4,7 +4,6 @@ var favicon = require('serve-favicon');
var logger = require('morgan'); var logger = require('morgan');
var bodyParser = require('body-parser'); var bodyParser = require('body-parser');
var fs = require('fs'); var fs = require('fs');
var config; var config;
if(fs.existsSync('./config/nodes.js')){ if(fs.existsSync('./config/nodes.js')){
@ -12,8 +11,7 @@ if(fs.existsSync('./config/nodes.js')){
} else { } else {
config = require('./config/nodes.default'); config = require('./config/nodes.default');
} }
console.log(config);
// var config = require('./config/nodes');
var Node = require('./models/node'); var Node = require('./models/node');
var app = express(); var app = express();

View File

@ -73,7 +73,10 @@ angular.module('netStatsApp.filters', [])
}) })
.filter('geoTooltip', function() { .filter('geoTooltip', function() {
return function(geo) { return function(geo) {
return geo.city + ", " + geo.country; if(geo !== null)
return geo.city + ", " + geo.country;
return '';
}; };
}); });