fixed local node null geo angular error
This commit is contained in:
parent
427b04c607
commit
c7d1144f1b
4
app.js
4
app.js
@ -4,7 +4,6 @@ var favicon = require('serve-favicon');
|
||||
var logger = require('morgan');
|
||||
var bodyParser = require('body-parser');
|
||||
var fs = require('fs');
|
||||
|
||||
var config;
|
||||
|
||||
if(fs.existsSync('./config/nodes.js')){
|
||||
@ -12,8 +11,7 @@ if(fs.existsSync('./config/nodes.js')){
|
||||
} else {
|
||||
config = require('./config/nodes.default');
|
||||
}
|
||||
console.log(config);
|
||||
// var config = require('./config/nodes');
|
||||
|
||||
var Node = require('./models/node');
|
||||
|
||||
var app = express();
|
||||
|
@ -73,7 +73,10 @@ angular.module('netStatsApp.filters', [])
|
||||
})
|
||||
.filter('geoTooltip', function() {
|
||||
return function(geo) {
|
||||
return geo.city + ", " + geo.country;
|
||||
if(geo !== null)
|
||||
return geo.city + ", " + geo.country;
|
||||
|
||||
return '';
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user