From d195651c8722db42866a6e241f0ef88442085a58 Mon Sep 17 00:00:00 2001 From: Eric Farber Date: Tue, 9 May 2023 14:30:11 -0400 Subject: [PATCH] skip hubPostRelease lookup if post has no release --- 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', })