From 870164ccb5c1205c764ce75ef50e113c4899e9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aron=20Sch=C3=BCler?= Date: Tue, 5 Nov 2024 14:28:15 +0100 Subject: [PATCH] fix: check gocardless bank data before setting state --- .../src/components/modals/GoCardlessExternalMsgModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx b/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx index 37d4913f224..d2b3730d5a9 100644 --- a/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx +++ b/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx @@ -42,7 +42,7 @@ function useAvailableBanks(country: string) { const { data, error } = await sendCatch('gocardless-get-banks', country); - if (error) { + if (error || !Array.isArray(data)) { setIsError(true); setBanks([]); } else {