fix(submit page): could return error 'publishCommentOptions.content is an empty string'

This commit is contained in:
Tom (plebeius.eth)
2024-12-11 16:30:45 +01:00
parent b951032177
commit 589f4bf073

View File

@@ -30,9 +30,9 @@ const usePublishPostStore = create<SubmitState>((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,