From 78f4c12b10f9055da4beb5d7f2f0836a0408e6e7 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 26 Feb 2024 19:12:38 +0000 Subject: [PATCH] fix(ProposalPage): remove superfluous promise rej as the repo_collection is only used for establishing which relays to use --- src/lib/stores/Proposal.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/stores/Proposal.ts b/src/lib/stores/Proposal.ts index a32bf98..76f033c 100644 --- a/src/lib/stores/Proposal.ts +++ b/src/lib/stores/Proposal.ts @@ -59,16 +59,13 @@ export const ensureProposalFull = (repo_id: string, proposal_id: string) => { if (proposal_summary_author_unsubsriber) proposal_summary_author_unsubsriber() proposal_summary_author_unsubsriber = undefined - new Promise(async (r, reject) => { + new Promise(async (r) => { const repo_collection = await awaitSelectedRepoCollection(repo_id) const repo = selectRepoFromCollection(repo_collection) - if (!repo) { - return reject() - } const relays_to_use = - repo.relays.length > 3 + repo && repo.relays.length > 3 ? repo.relays - : [...base_relays].concat(repo.relays) + : [...base_relays].concat(repo ? repo.relays : []) sub = ndk.subscribe( {