From 641db5defe10271b22c2ab01993fa9009119473f Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Fri, 20 Sep 2024 12:25:22 +0200 Subject: [PATCH] Update use-publish-reply.ts --- src/hooks/use-publish-reply.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hooks/use-publish-reply.ts b/src/hooks/use-publish-reply.ts index ab23ee08..c3961868 100644 --- a/src/hooks/use-publish-reply.ts +++ b/src/hooks/use-publish-reply.ts @@ -114,14 +114,14 @@ const useReply = ({ cid, subplebbitAddress }: { cid: string; subplebbitAddress: const newOptions: Partial = { subplebbitAddress, parentCid, - content: options.content ?? content, - link: options.link ?? link, + content: options.content === '' ? undefined : options.content ?? content, + link: options.link === '' ? undefined : options.link ?? link, spoiler: options.spoiler ?? spoiler, - displayName: options.displayName ?? author?.displayName ?? account?.author?.displayName, + displayName: options.displayName === '' ? undefined : options.displayName ?? author?.displayName ?? account?.author?.displayName, }; if ('displayName' in options) { - newOptions.displayName = options.displayName; + newOptions.displayName = options.displayName === '' ? undefined : options.displayName; } if (anonMode) {