From 6877312b7ab135f1886a4b5eb37ef6acb89b0452 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 11 Sep 2022 15:03:25 +0100 Subject: [PATCH] fix: integrations.list requested more than once --- app/hooks/useEmbeds.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/hooks/useEmbeds.ts b/app/hooks/useEmbeds.ts index 04af89ca8..d1dc8bd48 100644 --- a/app/hooks/useEmbeds.ts +++ b/app/hooks/useEmbeds.ts @@ -28,7 +28,9 @@ export default function useEmbeds(loadIfMissing = false) { } } - !integrations.isLoaded && loadIfMissing && fetchEmbedIntegrations(); + if (!integrations.isLoaded && !integrations.isFetching && loadIfMissing) { + fetchEmbedIntegrations(); + } }, [integrations, loadIfMissing]); return React.useMemo(