From 589f4bf073a2e088f6d15a0c336fdc8ca9e8d726 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Wed, 11 Dec 2024 16:30:45 +0100 Subject: [PATCH] fix(submit page): could return error 'publishCommentOptions.content is an empty string' --- src/stores/use-publish-post-store.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/use-publish-post-store.ts b/src/stores/use-publish-post-store.ts index 71da60b9..f6906131 100644 --- a/src/stores/use-publish-post-store.ts +++ b/src/stores/use-publish-post-store.ts @@ -30,9 +30,9 @@ const usePublishPostStore = create((set) => ({ if (subplebbitAddress !== undefined) nextState.subplebbitAddress = subplebbitAddress; if (title !== undefined) nextState.title = title; - if (content !== undefined) nextState.content = content; - if (link !== undefined) nextState.link = link; - if (spoiler !== undefined) nextState.spoiler = spoiler; + if (content !== undefined) nextState.content = content || undefined; + if (link !== undefined) nextState.link = link || undefined; + if (spoiler !== undefined) nextState.spoiler = spoiler || undefined; nextState.publishCommentOptions = { subplebbitAddress: nextState.subplebbitAddress,