fix for empty node info errors

This commit is contained in:
Konstantin 2016-11-08 12:15:10 +00:00
parent b0277543e1
commit e849a7f970
1 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ angular.module('netStatsApp.filters', [])
})
.filter('nodeVersion', function($sce) {
return function(version) {
if(typeof version !== 'undefined')
if(version)
{
var tmp = version.split('/');
@ -463,7 +463,7 @@ angular.module('netStatsApp.filters', [])
var tooltip = [];
var string = '';
if(node.info.node !== '' && typeof node.info.node !== 'undefined') {
if(node.info.node) {
var eth_version = node.info.node.split('/');
if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.')
@ -668,4 +668,4 @@ function blockTimeClass(diff)
return 'text-orange';
return 'text-danger'
}
}