From 4f1dd4be36d57239e0bf98be139796c6937ddc12 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 30 Jun 2021 16:24:03 +0200 Subject: [PATCH] Update Weights.js --- Projects/Governance/UI/Function-Libraries/Weights.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Projects/Governance/UI/Function-Libraries/Weights.js b/Projects/Governance/UI/Function-Libraries/Weights.js index 9d04c8662..fcc6fc522 100644 --- a/Projects/Governance/UI/Function-Libraries/Weights.js +++ b/Projects/Governance/UI/Function-Libraries/Weights.js @@ -60,7 +60,10 @@ function newGovernanceFunctionLibraryWeights() { node.payload.referenceParent !== undefined ) ) { - if (node.payload.votingProgram.votes !== undefined) { + if ( + node.payload.votingProgram !== undefined && + node.payload.votingProgram.votes !== undefined + ) { totalVotes = totalVotes + node.payload.votingProgram.votes } }