From f54b31a7596ba5c93799ce9e1dc23592f070b61f Mon Sep 17 00:00:00 2001 From: Eric Farber Date: Tue, 9 May 2023 15:10:46 -0400 Subject: [PATCH] skip hubPostRelease lookup if post has no release (#1038) --- js/sdk/src/components/HubPostCreate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/sdk/src/components/HubPostCreate.js b/js/sdk/src/components/HubPostCreate.js index c8ee53cd8..2aa2b3d43 100644 --- a/js/sdk/src/components/HubPostCreate.js +++ b/js/sdk/src/components/HubPostCreate.js @@ -227,7 +227,9 @@ const HubPostCreate = ({ result = await postInitViaHub(hubPubkey, slug, uri) } if (result?.success) { - await getHubsForRelease(metadataJson.reference) + if (metadataJson.reference) { + await getHubsForRelease(metadataJson.reference) + } enqueueSnackbar(result.msg, { variant: 'info', })