diff --git a/src/v2/components/Dashboard/NetworkOverview/StatCards/index.jsx b/src/v2/components/Dashboard/NetworkOverview/StatCards/index.jsx index 801b2238..8bb65d4d 100644 --- a/src/v2/components/Dashboard/NetworkOverview/StatCards/index.jsx +++ b/src/v2/components/Dashboard/NetworkOverview/StatCards/index.jsx @@ -48,7 +48,7 @@ const StatCards = () => { ({ - pubkey, - gossip, - coordinates, - name: (identity && identity.name) || identity.pubkey, - avatarUrl: (identity && identity.avatarUrl) || '', - })), - filter({what: 'Validator'}), - )(this.network); + if (!this.network || !this.network.length) { + return []; + } + + try { + return compose( + map(({nodePubkey: pubkey, tpu: gossip, coordinates, identity}) => ({ + pubkey, + gossip, + coordinates, + name: (identity && identity.name) || identity.pubkey, + avatarUrl: (identity && identity.avatarUrl) || '', + })), + filter({what: 'Validator'}), + )(this.network); + } catch (e) { + console.error('mapMarkers()', e); + return []; + } } get validators() {