fix for empty node info errors

This commit is contained in:
Konstantin 2016-11-08 12:15:10 +00:00
parent b0277543e1
commit e849a7f970

View File

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