From e84c4151a6d5dab04ac56887e6712bdf73feb170 Mon Sep 17 00:00:00 2001 From: "ildar.timerbaev" Date: Sun, 23 Jul 2023 18:06:59 +0300 Subject: [PATCH] Decks: fixed opening --- .../components/decks/deck-threads-form/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/components/decks/deck-threads-form/index.tsx b/src/common/components/decks/deck-threads-form/index.tsx index 7bb6528572c..dc32f9f8ea5 100644 --- a/src/common/components/decks/deck-threads-form/index.tsx +++ b/src/common/components/decks/deck-threads-form/index.tsx @@ -87,7 +87,7 @@ export const DeckThreadsForm = ({ useEffect(() => { if (persistable) { setThreadHost(threadHost ? threadHost : persistedForm?.threadHost); - setText(text ? text : persistedForm?.text); + setText(text ? text : persistedForm?.text ?? ""); setImage(image ? image : persistedForm?.image); setImageName(imageName ? imageName : persistedForm?.imageName); } @@ -172,12 +172,12 @@ export const DeckThreadsForm = ({ className={"deck-toolbar-threads-form-submit "} size={size} > - {!activeUser && !entry && text!!.length <= 255 && _t("decks.threads-form.login-and-publish")} + {!activeUser && !entry && text?.length <= 255 && _t("decks.threads-form.login-and-publish")} {activeUser && !entry && - text!!.length <= 255 && + text?.length <= 255 && (loading ? _t("decks.threads-form.publishing") : _t("decks.threads-form.publish"))} - {text!!.length > 255 && !entry && _t("decks.threads-form.create-regular-post")} + {text?.length > 255 && !entry && _t("decks.threads-form.create-regular-post")} {entry && _t("decks.threads-form.save")} ); @@ -239,12 +239,12 @@ export const DeckThreadsForm = ({ )} - {inline && text!!.length > 255 && ( + {inline && text?.length > 255 && ( {_t("decks.threads-form.max-length")} )} {!inline && (
- {text!!.length > 255 && ( + {text?.length > 255 && ( {_t("decks.threads-form.max-length")} )}