Skip to content

Commit

Permalink
fix: add null data check to nodes list in exit nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Sep 25, 2024
1 parent 65e8f29 commit 61b8479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/staking/components/DevSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function ExitNodes() {
const { data, status } = useStakingBackendSuspenseQuery(getExitLiquidationList);

const nodes = useMemo(() => {
if (status === 'success') {
if (status === 'success' && data) {
return data.result
.map((node) => ({ contractId: node.contract_id, pubKey: node.service_node_pubkey }))
.filter(({ contractId }) => contractId)
Expand Down

0 comments on commit 61b8479

Please sign in to comment.