From 721a3924cdfdca6f05f79c8afbdd8d65c1d8d442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sojka?= Date: Fri, 20 Sep 2024 16:42:19 +0200 Subject: [PATCH] Fix crash when selecting Treasury --- frontend/src/components/NewProposalForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/NewProposalForm.tsx b/frontend/src/components/NewProposalForm.tsx index c18a4a93..cb034ab5 100644 --- a/frontend/src/components/NewProposalForm.tsx +++ b/frontend/src/components/NewProposalForm.tsx @@ -26,6 +26,7 @@ export default function NewProposalForm({ const calls = useMemo(() => { if (!selectedType) return []; const typeIndex = proposalIds[selectedType]; + if(typeIndex === undefined) { return []} return [{ contractAddress: CONTRACT_ADDR, entrypoint: "submit_proposal",