fix: handle optional chaining for suspended candidates query (#11469)
This commit is contained in:
parent
50419fba4b
commit
75fcca85db
@ -46,7 +46,7 @@ const OPT_ACC = {
|
||||
function Suspended ({ className }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { api } = useApi();
|
||||
const candidates = useCall<CandidateSuspend[]>(api.query.society.suspendedCandidates.entries, undefined, OPT_CAN);
|
||||
const candidates = useCall<CandidateSuspend[]>(api.query.society.suspendedCandidates?.entries, undefined, OPT_CAN) ?? [];
|
||||
const members = useCall<AccountId[]>(api.query.society.suspendedMembers.keys, undefined, OPT_ACC);
|
||||
|
||||
const headerRef = useRef({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user