fix(governance): consensus table works without previous epoch (#3663)

This commit is contained in:
Sam Keen 2023-05-09 16:14:04 +01:00 committed by GitHub
parent c734556eb4
commit 3acc0e2401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ export const ConsensusValidatorsTable = ({
const gridRef = useRef<AgGridReact | null>(null); const gridRef = useRef<AgGridReact | null>(null);
const nodes = useMemo(() => { const nodes = useMemo(() => {
if (!data || !previousEpochData) return []; if (!data) return [];
let canonisedNodes = data let canonisedNodes = data
.sort((a, b) => { .sort((a, b) => {
const aVotingPower = new BigNumber(a.rankingScore.votingPower); const aVotingPower = new BigNumber(a.rankingScore.votingPower);